<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jakub Czakon, Autor w serwisie neptune.ai</title>
	<atom:link href="https://neptune.ai/blog/author/jakubczakon/feed" rel="self" type="application/rss+xml" />
	<link></link>
	<description>The experiment tracker for foundation model training.</description>
	<lastBuildDate>Wed, 14 May 2025 09:19:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/neptune.ai/wp-content/uploads/2022/11/cropped-Signet-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>Jakub Czakon, Autor w serwisie neptune.ai</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">211928962</site>	<item>
		<title>8 Best Data Science and Machine Learning Platforms For MLOps</title>
		<link>https://neptune.ai/blog/8-best-data-science-and-machine-learning-platforms-for-mlops</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Tue, 11 Oct 2022 15:24:21 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/8-best-data-science-and-machine-learning-platforms-for-mlops/</guid>

					<description><![CDATA[From gathering a team and preparing data to deployment, monitoring, and management of machine learning models, MLOps takes a lot of time, resources, and technology. It&#8217;s a complex network of processes and practices that require a certain type of technology. Statistics show that AI technology adoption is still low in businesses as only 14.6% of&#8230;]]></description>
										<content:encoded><![CDATA[
<p>From gathering a team and preparing data to deployment, monitoring, and management of machine learning models, MLOps takes a lot of time, resources, and technology. It&#8217;s a complex network of processes and practices that require a certain type of technology. <a href="https://www.forbes.com/sites/gilpress/2020/01/13/ai-stats-news-only-146-of-firms-have-deployed-ai-capabilities-in-production/?sh=368d21022650" target="_blank" rel="noreferrer noopener nofollow">Statistics </a>show that AI technology adoption is still low in businesses as<strong> only 14.6% of firms have invested in AI capabilities in production</strong>.</p>



<p>Whether you’re a data scientist wanting to optimize your ML experiment processes, or an owner of a business looking for AI means to grow your business, you can <strong>use dedicated MLOps tools that’ll help you manage your experiments at every stage</strong>.</p>



<p>Here are the best MLOps tools to prepare, deploy, and monitor experiments, and bring all your work to one place!</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-1-neptune">1. <a href="/" target="_blank" rel="noreferrer noopener">Neptune</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" fetchpriority="high" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Home_feel-in-control-1.png?resize=768%2C443&#038;ssl=1" alt="MLOps platform Neptune" class="wp-image-40051" width="768" height="443"/></figure>
</div>


<p>Neptune is a lightweight experiment management tool that helps you keep track of your machine learning experiments and manage all your model metadata. It is very flexible, works with many other frameworks, and thanks to its stable user interface, it enables great scalability.</p>



<p>Here’s what Neptune offers to monitor your ML models:</p>



<ul class="wp-block-list">
<li><strong>Fast and beautiful UI </strong>with a lot of capabilities to organize runs in groups, save custom dashboard views and share them with the team</li>



<li><strong>Version, store, organize, and query models, and model development metadata</strong> including dataset, code, env config versions, parameters and evaluation metrics, model binaries, description, and other details</li>



<li>Filter, sort, and group model training runs in a <strong>dashboard to better organize your work</strong></li>



<li><strong>Compare metrics and parameters </strong>in a table that automatically finds what changed between runs and what are the anomalies</li>



<li>Automatically record the code, environment, parameters, model binaries, and evaluation metrics every time you run an experiment</li>



<li>Your team can track experiments that are executed in scripts (Python, R, other), notebooks (local, Google Colab, AWS SageMaker) and do that on any infrastructure (cloud, laptop, cluster)</li>



<li>Extensive <strong>experiment tracking and visualization capabilities</strong> (resource consumption, scrolling through lists of images)</li>
</ul>



<p>Neptune is a robust software that lets you store all your data in one place, easily collaborate, and flexibly experiment with your models.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-2-amazon-sagemaker">2. <a href="https://aws.amazon.com/sagemaker/" target="_blank" rel="noreferrer noopener nofollow">Amazon SageMaker</a></h2>



<p>Amazon SageMaker is a platform that enables data scientists to build, train, and deploy machine learning models. It has all the integrated tools for the entire machine learning workflow providing all of the components used for machine learning in a single toolset.</p>



<p>SageMaker is a tool suitable for arranging, coordinating, and managing machine learning models. It has a single, web-based visual interface to perform all ML development steps – notebooks, experiment management, automatic model creation, debugging, and model drift detection</p>



<p><strong>Amazon SageMaker – summary:</strong></p>



<ul class="wp-block-list">
<li><em>Autopilot </em>automatically inspects raw data, applies feature processors, picks the best set of algorithms, trains and tunes multiple models, tracks their performance, and then ranks the models based on performance – it helps to deploy the best performing model</li>



<li><em>SageMaker Ground Truth</em> helps you build and manage highly accurate training datasets quickly</li>



<li><em>SageMaker Experiments</em> helps to organize and track iterations to machine learning models&nbsp; by automatically capturing the input parameters, configurations, and results, and storing them as ‘experiments’</li>



<li><em>SageMaker Debugger</em> automatically captures real-time metrics during training (such as training and validation, confusion, matrices, and learning gradients) to help improve model accuracy. Debugger can also generate warnings and remediation advice when common training problems are detected&nbsp;</li>



<li><em>SageMaker Model Monitor</em> allows developers to detect and remediate concept drift. It automatically detects concept drift in deployed models and gives detailed alerts that help identify the source of the problem</li>
</ul>



<section id="blog-intext-cta-block_85650ef8c4ae161945976749ebbc0319" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-note">Note</h3>
    
            <p>  See <a href="https://docs.neptune.ai/execution-environments/amazon_sagemaker.html" target="_blank" rel="noreferrer noopener">Neptune&#8217;s integration with SageMaker</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-3-cnvrg-io">3. <a href="https://cnvrg.io/" target="_blank" rel="noreferrer noopener nofollow">Cnvrg.io</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/cnvrg.png?ssl=1" alt="MLOps platform Cnvrg.io" class="wp-image-42199"/></figure>
</div>


<p>cnvrg is an end-to-end machine learning platform to build and deploy AI models at scale. It helps teams to manage, build and automate machine learning from research to production.</p>



<p>You can run and track experiments in hyperspeed with the freedom to use any compute environment, framework, programming language or tool &#8211; no configuration required.</p>



<p><strong>Here are the main features of cnvrg:</strong></p>



<ul class="wp-block-list">
<li>Organize all your data in one place and collaborate with your team</li>



<li>Real-time visualization allows you to visually track models as they run with automatic charts, graphs and more, and easily share with your team</li>



<li>Store models and meta-data, including parameters, code version, metrics and artifacts</li>



<li>Track changes and automatically record code and parameters for reproducibility</li>



<li>Build production-ready machine learning pipelines in a few clicks with the drag &amp; drop feature</li>
</ul>



<p>cnvrg lets you store, manage, and easily control all your data, experiments, and flexibly use it to your needs.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-4-iguazio">4. <a href="https://www.iguazio.com/" target="_blank" rel="noreferrer noopener nofollow">Iguazio</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Iguazio.png?ssl=1" alt="MLOps platform Iguazio" class="wp-image-42200"/></figure>
</div>


<p>Iguazio helps in the end-to-end automation of machine learning pipelines. It simplifies development, accelerates performance, facilitates collaboration, and addresses operational challenges.&nbsp;</p>



<p><strong>The platform incorporates the following components</strong>:</p>



<ul class="wp-block-list">
<li>A data science workbench that includes Jupyter Notebook, integrated analytics engines, and Python packages</li>



<li>Model management with experiments tracking and automated pipeline capabilities</li>



<li>Managed data and machine-learning (ML) services over a scalable Kubernetes cluster</li>



<li>A real-time serverless functions framework — Nuclio</li>



<li>Fast and secure data layer that supports SQL, NoSQL, time-series databases, files (simple objects), and streaming</li>



<li>Integration with third-party data sources such as Amazon S3, HDFS, SQL databases, and streaming or messaging protocols</li>



<li>Real-time dashboards based on Grafana</li>
</ul>



<p>Iguazio provides you with a complete data science workflow in a single ready-to-use platform for creating data science applications from research to production.&nbsp;</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-5-spell">5. <a href="https://spell.ml/" target="_blank" rel="noreferrer noopener nofollow">Spell</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Spell.png?ssl=1" alt="MLOps platform Spell" class="wp-image-42201"/></figure>
</div>


<p>Spell is a platform for training and deploying machine learning models quickly and easily. It provides a Kubernetes-based infrastructure to run and manage ML experiments, store all your data, and automate the MLOps lifecycle.</p>



<p><strong>Here are some of the main features of Spell:</strong></p>



<ul class="wp-block-list">
<li>Provides base environments for TensorFlow, PyTorch, Fast.ai, and others. Or, you can roll your own.</li>



<li>You can install any code packages you need using pip, conda, and apt.</li>



<li>Straightforward and accessible Jupyter workspaces, datasets, and resources</li>



<li>Runs can be linked together using workflows to manage model training pipelines</li>



<li>Model metrics automatically generated by Spell</li>



<li>Hyperparameter search</li>



<li>Model servers make it easy to productionize models trained on Spell, allowing you to use one tool for both your model training and model serving</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-6-mlflow">6. <a href="https://mlflow.org/" target="_blank" rel="noreferrer noopener nofollow">MLflow</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/5.-MLflow.png?ssl=1" alt="MLOps platform MLflow" class="wp-image-15180"/></figure>
</div>


<p>MLflow is an open-source platform that helps manage the whole machine learning lifecycle that includes experimentation, reproducibility, deployment, and a central model registry.&nbsp;</p>



<p>MLflow is suitable for individuals and for teams of any size.&nbsp;</p>



<p>The tool is library-agnostic. You can use it with any machine learning library and in any programming language.</p>



<p><strong>MLflow comprises four main functions:</strong></p>



<ol class="wp-block-list">
<li><strong>MLflow Tracking </strong>– an API and UI for logging parameters, code versions, metrics, and artifacts when running machine learning code and for later visualizing and comparing the results</li>



<li><strong>MLflow Projects</strong> – packaging ML code in a reusable, reproducible form to share with other data scientists or transfer to production</li>



<li><strong>MLflow Models</strong> – managing and deploying models from different ML libraries to a variety of model serving and inference platforms</li>



<li><strong>MLflow Model Registry</strong> – a central model store to collaboratively manage the full lifecycle of an MLflow Model, including model versioning, stage transitions, and annotations</li>
</ol>



<section id="blog-intext-cta-block_ff0270d7884ad285e64a3105b0c20b4b" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-note">Note</h3>
    
            <p>  See <a href="https://docs.neptune.ai/execution-environments/amazon_sagemaker.html" target="_blank" rel="noreferrer noopener">Neptune&#8217;s integration with MLflow</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-7-tensorflow">7. <a href="https://www.tensorflow.org/tfx" target="_blank" rel="noreferrer noopener nofollow">TensorFlow</a></h2>



<p>Tensorflow is an end-to-end platform for deploying production ML pipelines. It provides a configuration framework and shared libraries to integrate common components needed to define, launch, and monitor your machine learning system.</p>



<p>TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages. It also supports an ecosystem of powerful add-on libraries and models to experiment with, including Ragged Tensors, TensorFlow Probability, Tensor2Tensor and BERT.</p>



<p>TensorFlow lets you train and deploy your model easily, no matter what language or platform you use &#8211; use TensorFlow Extended (TFX) if you need a full production ML pipeline; for running inference on mobile and edge devices, use TensorFlow Lite; train and deploy models in JavaScript environments using TensorFlow.js.</p>



<p>It’s an MLOps tool suitable for beginners and advanced data scientists. It has all the necessary features and gives you the flexibility to use it however you want.</p>



<section id="blog-intext-cta-block_95b8613bd5820b0be83eef2c9a3a3a7a" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-note">Note</h3>
    
            <p>  See <a href="https://docs.neptune.ai/execution-environments/amazon_sagemaker.html" target="_blank" rel="noreferrer noopener">Neptune&#8217;s integration with TensorFlow</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-8-kubeflow">8. <a href="https://www.kubeflow.org/" target="_blank" rel="noreferrer noopener nofollow">Kubeflow</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/12.-Kubeflow.png?resize=842%2C771&#038;ssl=1" alt="MLOps platform Kubeflow" class="wp-image-15188" width="842" height="771"/></figure>
</div>


<p>Kubeflow is the ML toolkit for Kubernetes. It helps in maintaining machine learning systems by packaging and managing docker containers.&nbsp;</p>



<p>It facilitates the scaling of machine learning models by making run orchestration and deployments of machine learning workflows easier. It’s an open-source project that contains a curated set of compatible tools and frameworks specific to various ML tasks.</p>



<p><strong>Here’s a short Kubeflow summary:</strong></p>



<ul class="wp-block-list">
<li>A user interface (UI) for managing and tracking experiments, jobs, and runs</li>



<li>Notebooks for interacting with the system using the SDK</li>



<li>Re-use components and pipelines to quickly create end-to-end solutions without having to rebuild each time</li>



<li>Kubeflow Pipelines is available as a core component of Kubeflow or as a standalone installation</li>



<li>Multi-framework integration</li>
</ul>



<section id="blog-intext-cta-block_88267bf197027716f3abd14f889f11a1" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-note">Note</h3>
    
            <p>  See the comparison between <a href="/vs/kubeflow" target="_blank" rel="noreferrer noopener">Neptune and Kubeflow</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-to-wrap-it-up">To wrap it up</h2>



<p>End-to-en MLOps tools give you a lot of flexibility in carrying your ML experiments. They also automate work and optimize time-consuming processes. And even though they aim at the same goals &#8211; to give you an infrastructure for scalable ML experimentation, their features may differ. So choose the one that suits your needs to get the most out of it.</p>



<p>Happy experimenting!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4157</post-id>	</item>
		<item>
		<title>Best Tools to Do ML Model Monitoring</title>
		<link>https://neptune.ai/blog/ml-model-monitoring-best-tools</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Tue, 13 Sep 2022 11:10:08 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/ml-model-monitoring-best-tools/</guid>

					<description><![CDATA[If you deploy models to production sooner or later, you will start looking for ML model monitoring tools. When your ML models impact the business (and they should), you just need visibility into &#8220;how things work&#8221;. The first moment you really feel this is when things stop working. With no model monitoring set up, you&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you deploy models to production sooner or later, you will start looking for ML model monitoring tools.</p>



<p>When your ML models impact the business (and they should), you just need visibility into &#8220;how things work&#8221;.</p>



<p>The first moment you really feel this is when things stop working. With no model monitoring set up, you may have no idea what is wrong and where to start looking for problems and solutions. And people want you to fix this asap.</p>



<p>But what do &#8220;things&#8221; and &#8220;work&#8221; mean in this context?</p>



<p>Interestingly, depending on the team/problem/pipeline/setup, people mean entirely different things.</p>



<p>One benefit of working at an&nbsp;<a target="_blank" href="/blog/mlops-what-it-is-why-it-matters-and-how-to-implement-it-from-a-data-scientist-perspective" rel="noreferrer noopener">MLOps</a>&nbsp;company is that you can talk to many ML teams and get this info firsthand. So it turns out that when people say &#8220;I want to monitor ML models&#8221; they may want to:</p>



<ul class="wp-block-list">
<li><strong>monitor model performance in production</strong>: see how accurate the predictions of your model are. See if the model performance decays over time, and you should re-train it.</li>



<li><strong>monitor model input/output distribution</strong>: see if the distribution of input data and features that go into the model changed? Has the predicted class distribution changed over time? Those things could be connected to the&nbsp;<a target="_blank" href="/blog/concept-drift-best-practices" rel="noreferrer noopener">data and concept drift</a>.</li>



<li><strong>monitor model training and re-training</strong>: see learning curves, trained model predictions distribution, or confusion matrix during training and re-training.</li>



<li><strong>monitor model evaluation and testing</strong>: log metrics, charts, prediction, and other metadata for your automated evaluation or testing pipelines</li>



<li><strong>monitor hardware metrics</strong>: see how much CPU/GPU or Memory your models use during training and inference.</li>



<li><strong>monitor CI/CD pipelines for ML</strong>: see the evaluations from your CI/CD pipeline jobs and compare them visually. In ML, the metrics often only tell you so much, and someone needs to actually see the results.</li>
</ul>


    <a
        href="/blog/how-to-monitor-your-models-in-production-guide"
        id="cta-box-related-link-block_9afea88a2a624e24eb3e99baa0569d61"
        class="block-cta-box-related-link  l-margin__top--standard l-margin__bottom--standard"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-a-comprehensive-guide-on-how-to-monitor-your-models-in-production">                A Comprehensive Guide on How to Monitor Your Models in Production            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<p>Which ML model monitoring did you mean?</p>



<p>Either way, we&#8217;ll look into tools that help with all of those use cases. </p>



<p>But first&#8230;</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-how-to-compare-ml-model-monitoring-tools">How to compare ML model monitoring tools</h2>



<p>Obviously, depending on what you want to monitor, your needs will change but there are some things that you should definitely consider before choosing an ML model monitoring tool: </p>



<ul class="wp-block-list">
<li><strong>ease of integration</strong>: how easy is it to connect it to your model training and <a href="https://neptune.ai/blog/best-ml-model-deployment-tools" target="_blank" rel="noreferrer noopener">model deployment tools</a></li>



<li><strong>flexibility and expressiveness</strong>: can you log and see what you want and how you want it  </li>



<li><strong>overhead</strong>: how much overhead does the logging impose on your model training and deployment infrastructure</li>



<li><strong>monitoring functionality</strong>: can you monitor data/feature/concept/model drift? Can you compare multiple models that are running at the same time (A/B tests)?</li>



<li><strong>alerting</strong>: does it provide automated alerts when the performance or input goes crazy?</li>
</ul>



<p>Ok now, let&#8217;s look into the actual model monitoring tools!</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-ml-model-monitoring-tools">ML model monitoring tools</h2>



<p>First, let&#8217;s go back to different monitoring capabilities and see which tool checks these boxes. </p>



<section id="big-table-block_98c35566c3cc298ffa6942c9d9c65d51"
         class="block-big-table ">

    <div class="c-big-table__wrapper">
        <div class="c-big-table">

            <div class="c-big-table__head">

                <div class="c-row js-c-row--real">

                        <div class="c-cell c-cell--0 c-cell--mobile">
        <button class="js-c-button-mobile c-button-mobile">
            <img
                src="https://neptune.ai/wp-content/themes/neptune/img/icon-horizontal-dots.svg"
                loading="lazy"
                decoding="async"
                width="20"
                height="20"
                alt="">
        </button>
    </div>

    <div class="c-cell c-cell--0 c-cell--desktop">

        <div class="c-cell__section-menu">
            <button class="js-c-section-menu-button c-button">
                <span class="c-button__text">
                                    </span>
                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-down--white.svg"
                    loading="lazy"
                    decoding="async"
                    width="24"
                    height="24"
                    alt="">
            </button>

            <div class="js-c-section-menu c-section-menu"></div>
        </div>

        <div class="c-cell__buttons">

            
            <button
                class="js-button-expand-all c-button c-button--full-width c-button--tertiary c-button--small">
                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-right--blue.svg"
                    loading="lazy"
                    decoding="async"
                    width="15"
                    height="15"
                    alt="">
                <span class="c-button__text">Expand all</span>
            </button>

        </div>
    </div>

                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--1 c-cell--is-expanded"
        data-cell-class-number="c-cell--1"
    >
                    <div class="c-cell__logo-label">
                neptune.ai            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://neptune.ai/wp-content/uploads/2022/10/neptune_ai_signet_color.svg"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--2 c-cell--is-expanded"
        data-cell-class-number="c-cell--2"
    >
                    <div class="c-cell__logo-label">
                Arize AI            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/pobrane.png?fit=419%2C120&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://arize.com/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--3 c-cell--is-expanded"
        data-cell-class-number="c-cell--3"
    >
                    <div class="c-cell__logo-label">
                WhyLabs            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/Whylabs-logo.png?fit=538%2C94&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://whylabs.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--4"
        data-cell-class-number="c-cell--4"
    >
                    <div class="c-cell__logo-label">
                Grafana + Prometheus            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/Graphana-Prometheus.png?fit=348%2C145&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://grafana.com/docs/grafana/latest/getting-started/get-started-grafana-prometheus/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--5"
        data-cell-class-number="c-cell--5"
    >
                    <div class="c-cell__logo-label">
                Evidently            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/evidently-logo.png?fit=734%2C219&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.evidentlyai.com/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--6"
        data-cell-class-number="c-cell--6"
    >
                    <div class="c-cell__logo-label">
                Qualdo            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/qualdo.png?fit=310%2C163&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.qualdo.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--7 c-cell--is-expanded"
        data-cell-class-number="c-cell--7"
    >
                    <div class="c-cell__logo-label">
                Fiddler            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/fiddler-logo.png?fit=300%2C300&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.fiddler.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--8 c-cell--is-expanded"
        data-cell-class-number="c-cell--8"
    >
                    <div class="c-cell__logo-label">
                Amazon SageMaker            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Amazon-sagemaker-1.png?fit=368%2C137&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://aws.amazon.com/sagemaker/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--9"
        data-cell-class-number="c-cell--9"
    >
                    <div class="c-cell__logo-label">
                Seldon Core            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/core-logo-small.webp?fit=1197%2C362&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.seldon.io/solutions/open-source-projects/core"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--10 c-cell--is-expanded"
        data-cell-class-number="c-cell--10"
    >
                    <div class="c-cell__logo-label">
                Censius            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/CensiusLogo-Black.webp?fit=6565%2C1000&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://censius.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                
    
                </div>

                <div class="c-row c-row--fixed js-c-row--fixed">

                        <div class="c-cell c-cell--0 c-cell--mobile">
        <button class="js-c-button-mobile c-button-mobile">
            <img
                src="https://neptune.ai/wp-content/themes/neptune/img/icon-horizontal-dots.svg"
                loading="lazy"
                decoding="async"
                width="20"
                height="20"
                alt="">
        </button>
    </div>

    <div class="c-cell c-cell--0 c-cell--desktop">

        <div class="c-cell__section-menu">
            <button class="js-c-section-menu-button c-button">
                <span class="c-button__text">
                                    </span>
                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-down--white.svg"
                    loading="lazy"
                    decoding="async"
                    width="24"
                    height="24"
                    alt="">
            </button>

            <div class="js-c-section-menu c-section-menu"></div>
        </div>

        <div class="c-cell__buttons">

            
            <button
                class="js-button-expand-all c-button c-button--full-width c-button--tertiary c-button--small">
                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-right--blue.svg"
                    loading="lazy"
                    decoding="async"
                    width="15"
                    height="15"
                    alt="">
                <span class="c-button__text">Expand all</span>
            </button>

        </div>
    </div>

                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--1 c-cell--is-expanded"
        data-cell-class-number="c-cell--1"
    >
                    <div class="c-cell__logo-label">
                neptune.ai            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://neptune.ai/wp-content/uploads/2022/10/neptune_ai_signet_color.svg"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--2 c-cell--is-expanded"
        data-cell-class-number="c-cell--2"
    >
                    <div class="c-cell__logo-label">
                Arize AI            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/pobrane.png?fit=419%2C120&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://arize.com/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--3 c-cell--is-expanded"
        data-cell-class-number="c-cell--3"
    >
                    <div class="c-cell__logo-label">
                WhyLabs            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/Whylabs-logo.png?fit=538%2C94&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://whylabs.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--4"
        data-cell-class-number="c-cell--4"
    >
                    <div class="c-cell__logo-label">
                Grafana + Prometheus            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/Graphana-Prometheus.png?fit=348%2C145&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://grafana.com/docs/grafana/latest/getting-started/get-started-grafana-prometheus/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--5"
        data-cell-class-number="c-cell--5"
    >
                    <div class="c-cell__logo-label">
                Evidently            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/evidently-logo.png?fit=734%2C219&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.evidentlyai.com/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--6"
        data-cell-class-number="c-cell--6"
    >
                    <div class="c-cell__logo-label">
                Qualdo            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/qualdo.png?fit=310%2C163&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.qualdo.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--7 c-cell--is-expanded"
        data-cell-class-number="c-cell--7"
    >
                    <div class="c-cell__logo-label">
                Fiddler            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/fiddler-logo.png?fit=300%2C300&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.fiddler.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--8 c-cell--is-expanded"
        data-cell-class-number="c-cell--8"
    >
                    <div class="c-cell__logo-label">
                Amazon SageMaker            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Amazon-sagemaker-1.png?fit=368%2C137&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://aws.amazon.com/sagemaker/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--9"
        data-cell-class-number="c-cell--9"
    >
                    <div class="c-cell__logo-label">
                Seldon Core            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/core-logo-small.webp?fit=1197%2C362&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://www.seldon.io/solutions/open-source-projects/core"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                        <div
        class="js-c-cell js-c-cell-to-count c-cell c-cell--head c-cell--10 c-cell--is-expanded"
        data-cell-class-number="c-cell--10"
    >
                    <div class="c-cell__logo-label">
                Censius            </div>
        
        <div class="c-cell__header-outer">
            <div class="c-cell__inner">

                                    <div class="c-cell__logo">
                        <img
                            src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/09/CensiusLogo-Black.webp?fit=6565%2C1000&#038;ssl=1"
                            loading="lazy"
                            decoding="async"
                            width="32"
                            height="32"
                            class="c-cell__logo-image"
                            alt=""
                        />
                    </div>
                
                                    <a
                        href="https://censius.ai/"
                        class="c-cell__button c-button c-button--tertiary c-button--small"
                        target="_blank" rel="nofollow noopener noreferrer"                    >

                        <img
                            src="https://neptune.ai/wp-content/themes/neptune/img/icon-link-external.svg"
                            loading="lazy"
                            decoding="async"
                            width="14"
                            height="14"
                            class="c-button__arrow"
                            alt=""
                        />

                        <span class="c-button__text">
                            Website                        </span>

                    </a>
                            </div>
        </div>

    </div>
                
    
                </div>

            </div>

            
                                
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Model evaluation and testing
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Hardware metrics
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Model input/output distribution
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Model training and re-training
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Model performance in production
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner ">

                                    
                                        Limited
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
                    
                        <div class="c-row">

                    
                                                
                            <div
                                class="js-c-cell c-cell c-cell--0 c-cell--is-expanded"
                                data-cell-class-number="c-cell--0"
                            >
                                <div class="c-cell__inner ">

                                    
                                        CI/CD pipelines for ML
                                    
                                    
                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--1 c-cell--is-expanded"
                                data-cell-class-number="c-cell--1"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--2 c-cell--is-expanded"
                                data-cell-class-number="c-cell--2"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--3 c-cell--is-expanded"
                                data-cell-class-number="c-cell--3"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--4 "
                                data-cell-class-number="c-cell--4"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--5 "
                                data-cell-class-number="c-cell--5"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--6 "
                                data-cell-class-number="c-cell--6"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--7 c-cell--is-expanded"
                                data-cell-class-number="c-cell--7"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--8 c-cell--is-expanded"
                                data-cell-class-number="c-cell--8"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-checkmark.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--9 "
                                data-cell-class-number="c-cell--9"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                            <div
                                class="js-c-cell c-cell c-cell--10 c-cell--is-expanded"
                                data-cell-class-number="c-cell--10"
                            >
                                <div class="c-cell__inner c-cell__inner--icon">

                                    
                                    
                                    
                                        <img
                                            src="https://neptune.ai/wp-content/themes/neptune/img/blocks/big-table/icon-cancel.svg"
                                            loading="lazy"
                                            decoding="async"
                                            width="19"
                                            height="19"
                                            class="c-cell__icon"
                                            alt=""
                                        />

                                    
                                </div>
                            </div>

                                                    
                    </div>

                                    
            
        </div>
    </div>

    <div class="c-menu-mobile">
        <div class="c-menu-mobile__inner">

            <div class="c-cell__section-menu">
                <button class="js-c-section-menu-button c-button">
                <span class="c-button__text">
                                    </span>
                    <img
                        src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-down--white.svg"
                        loading="lazy"
                        decoding="async"
                        width="24"
                        height="24"
                        alt="">
                </button>

                <div class="js-c-section-menu c-section-menu"></div>
            </div>

            <div class="c-cell__buttons">

                
                <button
                    class="js-button-expand-all c-button c-button--full-width c-button--tertiary c-button--small">
                    <img
                        src="https://neptune.ai/wp-content/themes/neptune/img/icon-chevron-right--blue.svg"
                        loading="lazy"
                        decoding="async"
                        width="15"
                        height="15"
                        alt="">
                    <span class="c-button__text">Expand all</span>
                </button>

            </div>

            <button class="c-menu-mobile__close-button"></button>

        </div>
    </div>

</section>



<p>And now, we&#8217;ll review each of these tools in more detail. </p>



<h3 class="wp-block-heading" id="1-neptune">1. <a previewlistener="true" href="/" target="_blank" rel="noreferrer noopener nofollow">neptune.ai</a></h3>



<div id="app-screenshot-block_c84bff8280691bb6152e5f81e19b38ba"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=1020%2C521&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=480%2C245&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=768%2C392&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=1020%2C521&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="521"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Real-time training monitoring in the Neptune app 			</figcaption>
			
</div>



<div id="separator-block_1b854e5080aab56e9db7728c64a3ce86"
         class="block-separator block-separator--15">
</div>



<p>Neptune is the most scalable experiment tracker designed with a strong focus on teams that train foundation models.</p>



<p>You can <a href="https://docs.neptune.ai/log_metadata" target="_blank" rel="noreferrer noopener">log and display pretty much any ML metadata</a> from metrics and losses, prediction images, hardware metrics to interactive visualizations.</p>



<p>When it comes to monitoring ML models, people mostly use it for:</p>



<ul class="wp-block-list">
<li>model training, evaluation, testing,&nbsp;</li>



<li>hardware metrics display&nbsp;</li>



<li>but you can (and some teams do) log performance metrics from production jobs and&nbsp;<a target="_blank" href="/customers/continuum-industries" rel="noreferrer noopener">see metadata from ML CI/CD pipelines</a>.</li>
</ul>



<p>It has a flexible metadata structure that allows you to organize training and production metadata the way you want to. You can think of it as a dictionary or a folder structure that you create in code and display in the UI.</p>



<p>You can <a href="https://docs.neptune.ai/custom_dashboard" target="_blank" rel="noreferrer noopener">build dashboards</a> that display the performance and hardware metrics you want to see to better organize your model monitoring information.</p>



<p>You can&nbsp;<a href="/product/compare-experiments" target="_blank" rel="noreferrer noopener">compare metrics</a>&nbsp;between models and runs to see how model update changed performance or hardware consumption and whether you should abort live model training because it just won&#8217;t beat the baseline.</p>



<p>If you are wondering if it will fit your workflow:</p>



<ul class="wp-block-list">
<li>check out <a href="/customers" target="_blank" rel="noreferrer noopener">case studies of how people set up their MLOps/LLMOps tool stack</a> with Neptune</li>



<li>explore an <a href="https://scale.neptune.ai/o/examples/org/LLM-Pretraining/reports/9e6a2cad-77e7-42df-9d64-28f07d37e908" target="_blank" rel="noreferrer noopener nofollow">example public project</a></li>
</ul>



<h3 class="wp-block-heading" id="2-arize">2. <a href="https://arize.com/" target="_blank" rel="noreferrer noopener nofollow">Arize AI</a></h3>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" decoding="async" width="980" height="614" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=980%2C614&#038;ssl=1" alt="Model monitoring Arize AI" class="wp-image-13601" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?w=980&amp;ssl=1 980w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=768%2C481&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=200%2C125&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=220%2C138&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=120%2C75&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=160%2C100&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=300%2C188&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/ML-model-monitoring-arize.jpg?resize=480%2C301&amp;ssl=1 480w" sizes="(max-width: 980px) 100vw, 980px" /><figcaption class="wp-element-caption"><strong><em>Example embedding drift monitor | </em></strong><a href="https://www.arize.com/" target="_blank" rel="noreferrer noopener nofollow"><strong><em>Source</em></strong></a></figcaption></figure>



<p>Arize AI is an ML model monitoring platform that is capable of boosting the observability of your project and helping you with troubleshooting production AI.&nbsp;</p>



<p>If your ML team is working without a powerful observability and real-time analytics tool, engineers can waste days trying to identify potential problems. Arize AI makes it easy to pinpoint what went wrong, so that software engineers immediately find and fix a problem, before it impacts the business. Arize AI has the following features:</p>



<ul class="wp-block-list">
<li><strong>Simple integration.</strong> Arize AI can be used to enhance observability of any model in any environment. Detailed documentation and community support allow you to integrate and go live in minutes.&nbsp;</li>



<li><strong>Pre-launch validation.</strong> It’s important to check that your models will behave as expected before they are deployed. Pre-launch validation toolkit can help you gain confidence in the model’s performance and perform pre- and post-launch validation checks.&nbsp;</li>



<li><strong>Automatic monitoring.</strong><a href="https://arize.com/model-monitoring/" target="_blank" rel="noreferrer noopener"> Model monitoring</a> should be proactive rather than reactive so that you could identify performance degradation or prediction drifts early on. Automated monitoring systems can help you with that, and integrations with tools such as PagerDuty or Slack can notify you in real-time. It demands zero setup and provides space for easy-to-customize dashboards.</li>



<li><strong>Monitor and Identify Drift.</strong> Track for prediction, data, and concept drift across model dimensions and values, and compare across training, validation, and production environments.</li>



<li><strong>Ensure Data Integrity.</strong> Guarantee the quality of model data inputs and outputs with automated checks for missing, unexpected, or extreme values.</li>



<li><strong>Improve Model Performance. </strong>Use ML performance tracing to automatically pinpoint the source of model performance problems and map back to underlying data issues.</li>



<li><strong>Leverage Explainability. </strong>See how a model dimension affects prediction distributions, and leverage SHAP to explain feature importance for specific cohorts.</li>



<li><strong>Monitor Unstructured Data.</strong> By monitoring embeddings of unstructured data for CV or NLP models with Arize, teams can proactively identify when their unstructured data is drifting.&nbsp;</li>



<li><strong>Dynamic Dashboards.</strong> Leverage pre-configured dashboard templates or create customized dashboards to help focus troubleshooting efforts.</li>
</ul>



<h3 class="wp-block-heading" id="3-whylabs">3. <a href="https://whylabs.ai/" target="_blank" rel="noreferrer noopener nofollow">WhyLabs</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Whylabs-model-monitoring.png?ssl=1" alt="" class="wp-image-61096"/><figcaption class="wp-element-caption"><em>WhyLabs dashboard | <a href="https://docs.whylabs.ai/docs/whylabs-monitoring" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>WhyLabs is a <strong>model monitoring an</strong>d observability tool that helps ML teams with <strong>monitoring data pipelines and ML applications</strong>. Monitoring the performance of the deployed model is critical to proactively addressing this issue. You can determine the appropriate time and frequency for retraining and updating the model. It helps with detecting data quality degradation, data drift, and data bias. WhyLabs has quickly become quite popular among developers since it can easily be used in mixed teams where seasoned developers work side-by-side with junior employees.</p>



<p>The tool enables you to:</p>



<ul class="wp-block-list">
<li>Automatically monitor model performance with out-of-the box or tailored metrics.</li>



<li>Detect overall model performance degradation and successfully identify issues causing it.</li>



<li>Perform easy integrations with other tools while maintaining high privacy-preserving standards via their open source data logging library – whylogs.</li>



<li>Use popular libraries and frameworks like MLFlow, Spark, Sagemaker, etc. to make WhyLabs adoption go smoothly.</li>



<li>Debug data and model issues easily with in-built tools.</li>



<li>Set up the tool in seconds with an easy-to-use zero-configuration setup.</li>



<li>Be notified about the current workflow via the channel that you prefer like Slack, SMS, etc.</li>
</ul>



<p>One of the biggest advantages of WhyLabs for model monitoring is that it eliminates the need for manual problem-solving and, consequently, saves money and time. You can use this tool to work with structures and unstructured data, regardless of the scale. WhyLabs uses AWS cloud. It runs containers with Amazon ECS and uses Amazon EMR for large-scale data processing.&nbsp;</p>



<h3 class="wp-block-heading" id="4-grafana-prometheus">4. <a href="https://grafana.com/" target="_blank" rel="noreferrer noopener nofollow">Grafana</a> + <a href="https://prometheus.io/" target="_blank" rel="noreferrer noopener nofollow">Prometheus</a>&nbsp;</h3>



<p>Prometheus is a popular <strong>open-source ML model monitoring tool</strong> that was originally developed by SoundCloud to collect multidimensional data and queries.&nbsp;</p>



<p>The main advantages of Prometheus are tight integration with Kubernetes and many of the available exporters and client libraries, as well as a fast query language. Prometheus is also Docker compatible and available on the Docker Hub.</p>



<p>The Prometheus server has its own self-contained unit that does not depend on network storage or external services. So it doesn&#8217;t require a lot of work to deploy additional infrastructure or software. Its main task is to store and monitor certain objects. An object can be anything: a Linux server, one of the processes, a database server, or any other component of the system. Each element that you want to monitor is called a metric.&nbsp;</p>



<p>The Prometheus server reads targets at an interval that you define to collect metrics and stores them in a time series database. You set the targets and the time interval for reading the metrics. You query the Prometheus time series database for where metrics are stored using the PromQL query language.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Grafana-model-monitoring.png?ssl=1" alt="Grafana - model monitoring" class="wp-image-53412" style="width:767px;height:365px"/><figcaption class="wp-element-caption"><em>Grafana dashboard | <a style="font-style: italic;" href="https://grafana.com/" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Grafana allows you to <strong>visualize monitoring metrics. G</strong>rafana specializes in time series analytics. It can visualize the results of monitoring work in the form of line graphs, heat maps, and histograms.&nbsp;</p>



<p>Instead of writing PromQL queries directly to the Prometheus server, you use Grafana GUI boards to request metrics from the Prometheus server and render them in the Grafana dashboard.</p>



<p>Key features of Grafana:</p>



<ul class="wp-block-list">
<li><strong>Alerts.</strong> You can receive alerts through a variety of channels from messengers to Slack. If you prefer other options, you can add your own alerts manually with a little bit of code.</li>



<li><strong>Dashboard templates.</strong> You can create customized dashboards for different tasks and manage everything you need in one interface.&nbsp;</li>



<li><strong>Automation.</strong> You can automate work in Grafana using scripts.&nbsp;</li>



<li><strong>Annotations.</strong> If something goes wrong, you can time-match events from different dashboards and sources to analyze the cause of the failure. You can create annotations manually by adding comments to the desired points and plot fragments.&nbsp;</li>
</ul>



<h3 class="wp-block-heading" id="5-evidently">5. <a href="https://github.com/evidentlyai/evidently" target="_blank" rel="noreferrer noopener nofollow">Evidently</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Evidently.png?ssl=1" alt="ML model monitoring - Evidently" class="wp-image-40876" style="width:750px;height:527px"/><figcaption class="wp-element-caption"><em>Evidently dashboard | <a href="https://github.com/evidentlyai/evidently" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Evidently is an open-source ML model monitoring system. It helps analyze machine learning models during development, validation, or production monitoring. The tool <strong>generates interactive reports from pandas DataFrame</strong>.&nbsp;</p>



<p>Currently, 6 reports are available:</p>



<ol class="wp-block-list">
<li><strong>Data Drift: </strong>detects changes in feature distribution</li>



<li><strong>Numerical Target Drift</strong>: detects changes in the numerical target and feature behavior</li>



<li><strong>Categorical Target Drift</strong>: detects changes in categorical target and feature behavior</li>



<li><strong>Regression Model Performance</strong>: analyzes the performance of a regression model and model errors</li>



<li><strong>Classification Model Performance</strong>: analyzes the performance and errors of a classification model. Works both for binary and multi-class models</li>



<li><strong>Probabilistic Classification Model Performance</strong>: analyzes the performance of a probabilistic classification model, quality of model calibration, and model errors. Works both for binary and multi-class models</li>
</ol>



<h3 class="wp-block-heading" id="6-qualdo">6. <a href="https://www.qualdo.ai/monitor-ml-model-performance-monitoring/" target="_blank" rel="noreferrer noopener nofollow">Qualdo</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Qualdo.png?ssl=1" alt="ML model monitoring - Qualdo" class="wp-image-40873"/><figcaption class="wp-element-caption"><em><a href="https://www.qualdo.ai/monitor-ml-model-performance-monitoring/" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Qualdo is a Machine Learning model performance monitoring tool in Azure, Google, and AWS. The tool has some nice, basic features that allow you to <strong>observe your models throughout their entire lifecycle</strong>.</p>



<p>With Qualdo, you can gain insights from production ML input/predictions data, logs and application data to watch and <a href="/blog/improving-ml-model-performance" target="_blank" rel="noreferrer noopener">improve your ML model performance</a>. There’s model deployment and automatic monitoring of data drifts and data anomalies, you can see quality metrics and visualizations.</p>



<p>It also offers tools to monitor ML pipeline performance in Tensorflow and leverages Tensorflow&#8217;s data validation and model evaluation capabilities.</p>



<p>Additionally, it integrates with many AI, machine learning, and communication tools to improve your workflow and make collaboration easier.</p>



<p>It’s a rather simple tool and doesn’t offer many advanced features. Hence, it’s best if you’re looking for an easy ML model monitoring performance solution.</p>



<h3 class="wp-block-heading" id="7-fiddler">7. <a href="https://www.fiddler.ai/ml-monitoring" target="_blank" rel="noreferrer noopener nofollow">Fiddler</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Fiddler.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Fiddler.png?ssl=1" alt="ML model monitoring - Fiddler" class="wp-image-40874"/></a><figcaption class="wp-element-caption"><em>Fiddler dashboard | <a href="https://www.fiddler.ai/ml-monitoring" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Fiddler is a model monitoring tool that has a user-friendly, clear, and simple interface. It lets you monitor model performance, explain and debug model predictions, analyze model behavior for entire data and slices, deploy machine learning models at scale, and manage your machine learning models and datasets</p>



<p>Here are Fiddler’s ML model monitoring features:</p>



<ul class="wp-block-list">
<li><strong>Performance monitoring</strong>—a visual way to explore data drift and identify what data is drifting, when it’s drifting, and how it’s drifting</li>



<li><strong>Data integrity</strong>—to ensure no incorrect data gets into your model and doesn&#8217;t negatively impact the end-user experience</li>



<li><strong>Tracking outliers</strong>—Fiddler shows both Univariate and Multivariate Outliers in the Outlier Detection tab</li>



<li><strong>Service metrics</strong>—give you basic insights into the operational health of your ML service in the production</li>



<li><strong>Alerts</strong>—Fiddler allows you to set up alerts for a model or group of models in a project&nbsp; to warn about issues in production</li>
</ul>



<p>Overall, it’s a great tool for monitoring machine learning models with all the necessary features.</p>



<h3 class="wp-block-heading" id="8-amazon-sagemaker-model-monitor">8. <a href="https://aws.amazon.com/sagemaker/model-monitor/" target="_blank" rel="noreferrer noopener nofollow">Amazon SageMaker Model Monitor</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Sagemaker.png?ssl=1" alt="ML model monitoring - Sagemaker" class="wp-image-40877" style="width:580px;height:380px"/><figcaption class="wp-element-caption"><em>SageMaker dashboard | <a href="https://aws.amazon.com/sagemaker/model-monitor/" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Amazon SageMaker Model Monitor one of the Amazon SageMaker tools. It automatically <strong>detects and alerts on inaccurate predictions</strong> from models deployed in production so you can maintain the accuracy of models.</p>



<p>Here&#8217;s the summary of SageMaker Model Monitoring features:</p>



<ul class="wp-block-list">
<li><strong>Customizable data collection and monitoring</strong> – you can select the data you want to monitor and analyze without the need to write any code</li>



<li>Built-in analysis in the form of statistical rules, to detect drifts in data and model quality</li>



<li>You can write<strong> custom rules and specify thresholds for each rule</strong>. The rules can then be used to analyze model performance</li>



<li>Visualization of metrics, and running ad-hoc analysis in a SageMaker notebook instance</li>



<li>Model prediction – import your data to compute model performance</li>



<li>Schedule monitoring jobs</li>



<li>The tool is integrated with Amazon SageMaker Clarify so you can <strong>identify potential bias</strong> in your ML models</li>
</ul>



<p>When used with other tools for ML, the SageMaker Model Monitor gives you a full control of your experiments.</p>



<h3 class="wp-block-heading" id="9-seldon-core">9. <a href="https://github.com/SeldonIO/seldon-core" target="_blank" rel="noreferrer noopener nofollow">Seldon Core</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/ML-model-monitoring-Seldon.png?ssl=1" alt="ML model monitoring - Seldon" class="wp-image-40878"/><figcaption class="wp-element-caption"><em><a href="https://github.com/SeldonIO/seldon-core" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Seldon Core is an open-source platform for <strong>deploying machine learning models on Kubernetes</strong>. It’s an MLOps framework that lets you package, deploy, monitor, and manage thousands of production machine learning models.</p>



<p>It runs on any cloud and on-premises, is framework agnostic, supports top ML libraries, toolkits, and languages. Also, it converts your ML models (e.g., Tensorflow, Pytorch, H2o) or language wrappers (Python, Java) into production REST/GRPC microservices.</p>



<p>Basically, Seldon Core has all the necessary functions to scale a high number of ML models. You can expect features like advanced metrics, outlier detectors, canaries, rich inference graphs made out of predictors, transformers, routers, or combiners, and more.</p>



<h3 class="wp-block-heading" id="10-censius">10. <a href="https://censius.ai/platform" target="_blank" rel="noreferrer noopener">Censius</a></h3>



<p>Censius is an AI model observability platform that lets you monitor the entire ML pipeline, explain predictions, and proactively fix issues for an improved business outcome.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Censius-model-monitoring.png?ssl=1" alt="" class="wp-image-61094"/><figcaption class="wp-element-caption"><em>Censius dashboard | <a href="https://censius.ai/platform" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>Key features of Censius: </p>



<ul class="wp-block-list">
<li>Completely configurable monitors that detect Drifts, Data quality issues and performance Degradation</li>



<li>Real time notifications that keep you ahead of issues in your Model Serving pipeline</li>



<li>Customizable dashboards where you can slice &amp; dice your Model training and production data and watch for any business KPIs</li>



<li>Native support for A/B test frameworks as you continue to experiment &amp; iterate with different models in production</li>



<li>Drill down to the Root cause of your problem with explainability of tabular, image, textual data</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p>Now that you know how to evaluate tools for ML model monitoring and what is out there, the best way to go forward is to test out the ones you liked!</p>



<p>You can also continue evaluating tools by checking out this great resource,&nbsp;<a target="_blank" href="https://mlops.community/learn/monitoring/" rel="noreferrer noopener">ml model monitoring tools comparison prepared by the mlops.community</a>.</p>



<p>Either way, happy monitoring!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3869</post-id>	</item>
		<item>
		<title>MLOps at a Reasonable Scale [The Ultimate Guide]</title>
		<link>https://neptune.ai/blog/mlops-at-reasonable-scale</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Wed, 07 Sep 2022 12:06:02 +0000</pubDate>
				<category><![CDATA[MLOps]]></category>
		<guid isPermaLink="false">https://neptune.test/mlops-at-reasonable-scale/</guid>

					<description><![CDATA[For a couple of years now, MLOps is probably the most (over)used term in the ML industry. The more models people want to deploy to production, the more they think about how to organize the Ops part of this process.&#160; Naturally, the way to do MLOps has been shaped by the big players on the&#8230;]]></description>
										<content:encoded><![CDATA[
<p>For a couple of years now, <a href="/blog/mlops">MLOps</a> is probably the most (over)used term in the ML industry. The more models people want to deploy to production, the more they think about how to organize the Ops part of this process.&nbsp;</p>



<p>Naturally, the way to do <strong>MLOps has been shaped by the big players</strong> on the market &#8211; companies like Google, Netflix, and Uber. What they did for the community was (and is) great, but they were solving their MLOps problems.&nbsp;</p>



<p>And most companies don’t have their problems. The <strong>majority of ML teams operate on a smaller scale</strong> and have different challenges. Yet they are the biggest part of the ML industry, and they want to know what’s the best way to do MLOps at their scale, with their resources and limitations.&nbsp;</p>



<p>The<strong> reasonable scale MLOps</strong> is addressing this need. “Reasonable scale” is a<a href="https://towardsdatascience.com/ml-and-mlops-at-a-reasonable-scale-31d2c0782d9c" target="_blank" rel="noreferrer noopener nofollow"> term coined last year by Jacopo Tagliabue</a>, and it refers to the companies that:</p>



<ul class="wp-block-list">
<li>have ml models that generate hundreds of thousands to tens of millions of USD per year (rather than hundreds of millions or billions)</li>



<li>have dozens of engineers (rather than hundreds or thousands)</li>



<li>deal with terabytes (rather than petabytes or exabytes)</li>



<li>have a finite amount of computing budget</li>
</ul>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="628" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=1200%2C628&#038;ssl=1" alt="" class="wp-image-18805" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Reasnoble-scale-companies-vs-hyperscale-companies.jpg?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>In this guide, you’ll learn more about the MLOps at a reasonable scale, and you’ll get to know the best practices, templates, and examples that will help you understand how to implement them in your work.&nbsp;</p>



<p>Before that, let’s do a few steps back and see why we even talk about reasonable scale.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-mlops-vs-mlops-at-a-reasonable-scale">MLOps vs MLOps at a reasonable scale</h2>



<p>Solving the right problem and creating a working model, while still crucial, is no longer enough. At more and more companies, ML needs to be deployed to production to show “real value for the business”.</p>



<p>Otherwise, your managers or managers of your managers will start asking questions about the “ROI of our AI investment”. And that means trouble.</p>



<p>The good thing is that many teams, large and small, are past that point, and their models are doing something valuable for the business. The question is:</p>



<p><strong>How do you actually deploy, maintain and operate those models in production?</strong></p>



<p>The answer seems to be MLOps.</p>



<p>In 2021 so many teams looked for tools and best practices around ML operations that MLOps became a real deal. Dozens of tools and startups were created. 2021 was even called “a year of MLOps”. Cool.</p>



<p>But what does it mean to have MLOps set up?</p>



<p>If you read through online resources, it would be:</p>



<ul class="wp-block-list">
<li>reproducible and orchestrated pipelines,</li>



<li>alerts and monitoring,</li>



<li>versioned and traceable models,</li>



<li>auto-scalable model serving endpoints,</li>



<li>data versioning and data lineage,</li>



<li>feature stores,</li>



<li>and so much more.</li>
</ul>



<p>But does it have to be all of it?</p>



<p><strong>Do you really need all those things, or is it just a “standard industry best practice”? </strong>Where do those “standard industry best practices” come from anyway?</p>



<p>Most of the good blog posts, whitepapers, conference talks, and tools are created by people from super-advanced, hyperscale companies. Companies like Google, Uber, and Airbnb. They have hundreds of people working on ML problems that serve trillions of requests a month.</p>



<p>That means most of the best practices you find are naturally biased toward hyperscale. But <strong>99% of companies are not doing production ML at hyperscale</strong>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Reasonable-scale-companies-1.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Reasonable-scale-companies-1.png?ssl=1" alt="Reasonable scale companies " class="wp-image-67249" style="width:710px;height:366px"/></a><figcaption class="wp-element-caption"><em>Source: <a href="https://www.mihaileric.com/posts/mlops-is-a-mess/" target="_blank" rel="noreferrer noopener nofollow">MLOps Is a Mess But That&#8217;s to be Expected</a></em></figcaption></figure>
</div>


<p>Most companies are either not doing any production ML yet or do it at a<a href="https://towardsdatascience.com/ml-and-mlops-at-a-reasonable-scale-31d2c0782d9c"> reasonable scale.</a> Reasonable scale as in five ML people, ten models, millions of requests. Reasonable, demanding, but nothing crazy and hyperscale.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Reasonable-scale-companies-2.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Reasonable-scale-companies-2.png?ssl=1" alt="Reasonable scale companies " class="wp-image-67250"/></a><figcaption class="wp-element-caption"><em>Source: <a href="https://towardsdatascience.com/ml-and-mlops-at-a-reasonable-scale-31d2c0782d9c">ML and MLOps at a Reasonable Scale</a></em></figcaption></figure>
</div>


<p>Ok, so the best practices are biased toward hyperscale, but what is wrong with that?</p>



<p>The problem is when a reasonable scale team is going with “standard industry best practice” and tries to build or buy a full-blown, hyperscale MLOps system.</p>



<p><strong>Building hyperscale MLOps with the resources of a reasonable scale ML team just cannot work.</strong></p>



<p>Hyperscale companies need everything. Reasonable scale companies need to solve the most important current challenges. They need to be smart and pragmatic about what they need right now.&nbsp;</p>



<p>The tricky part is to tell what your actual needs are and what are potential, nice-to-have, future needs. With so many blog articles and conference talks out there, it is hard. Once you are clear about your reality, you are halfway there.&nbsp;</p>



<p>But there are examples of <strong>pragmatic companies achieving great results by embracing reasonable scale MLOps limitations</strong>:</p>



<ul class="wp-block-list">
<li><a href="https://open.spotify.com/episode/6v1eDLc1PkQPzgzkxzBJXA?si=730b0a3fcda74d7a" target="_blank" rel="noreferrer noopener nofollow">Lemonade</a> generates $100M+ in annual recurring revenue from ML models with just 2 ML engineers serving 20 data scientists.</li>



<li><a href="https://open.spotify.com/episode/5AxI8KVtm5PsN8HzprUVG2?si=9951085620314616" target="_blank" rel="noreferrer noopener nofollow">Coveo</a> leverage tools to deliver recommendation systems to thousands of companies with (almost) no ML infrastructure people.</li>



<li><a href="https://neptune.ai/customers/hypefactors" target="_blank" rel="noreferrer noopener nofollow">Hypefactors</a> runs NLP/CV data enrichment pipelines on the entire social media landscape with a team of just a few people.</li>
</ul>



<p>You probably never heard of them, but their problems and solutions are a lot closer to your use case than that Netflix blog post or Google whitepaper you have opened in the other tab.</p>



<section id="blog-intext-cta-block_5ce2ea1af91f65b538476369b9408fd6" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-read-more">Read more</h3>
    
            <p>Check <a href="/customers">more stories from reasonable scale companies</a> about how they solved different parts of their ML workflow.</p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-the-pillars-of-mlops">The pillars of MLOps</h2>



<p><strong>Ok, so say you want to do the MLOps right, what do you do? </strong>Even though MLOps is still developing, there are some things that are clear(ish), e.g. the pillars of MLOps that can be used as a kind of guidance on how to even start thinking about this topic.&nbsp;</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-the-pillars-of-mlops-stack-components">The pillars of MLOps &#8211; stack components&nbsp;</h3>



<p>The first approach is based on the<strong> four or five main pillars of MLOps</strong> that you need to implement somehow:</p>



<ul class="wp-block-list">
<li>Data ingestion (and optionally feature store)</li>



<li>Pipeline and orchestration</li>



<li>Model registry and experiment tracking</li>



<li>Model deployment and serving</li>



<li>Model monitoring</li>
</ul>



<p>I say four or five because the data ingestion part is not always mentioned as one of the pillars. But I believe that it’s a crucial element and shouldn’t be skipped.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="628" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=1200%2C628&#038;ssl=1" alt="" class="wp-image-20167" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/The-Five-Pillars-of-MLOps.jpg?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>The pillars of MLOps</em></figcaption></figure>
</div>


<p>Each of those <strong>can be solved with a simple script or a full-blown solution depending on your needs.</strong></p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-end-to-end-vs-a-canonical-stack-of-best-in-class-tools">End-to-end vs a canonical stack of best-in-class tools</h3>



<p>The decision boils down to whether you want:</p>



<ul class="wp-block-list">
<li>an end-to-end platform vs a stack of best-in-class point solutions&nbsp;</li>



<li>to buy vs build vs maintain <a href="/blog/best-open-source-mlops-tools" target="_blank" rel="noreferrer noopener">open-source MLOps tools</a> (or buy and build and maintain oss).</li>
</ul>



<p>The answer, as always, is “it depends”.</p>



<p>Some teams have a fairly standard ML use case and decide to buy an end-to-end ML platform.</p>



<p>By doing so, they get everything-MLOps out of the box, and they can focus on ML.</p>



<p>The problem is that the further away you go from the standard use case, the harder it gets to adjust the platform to your workflow. And <strong>everything looks simple and standard at the beginning. </strong>Then business needs to change, requirements change, and it is not so simple anymore.</p>



<p>And then there is the pricing discussion. Can you justify spending “this much” on an end-to-end enterprise solution when all you really need is just 3 out of 10 components? Sometimes you can, and sometimes you cannot.</p>


    <a
        href="/blog/end-to-end-mlops-stack"
        id="cta-box-related-link-block_8a40eb68d39af8b0e1aa9d8fd779a316"
        class="block-cta-box-related-link  l-margin__top--standard l-margin__bottom--standard"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-3-takes-on-end-to-end-for-the-mlops-stack-was-it-worth-it">                3 Takes on End-to-End For the MLOps Stack: Was It Worth It?            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-the-pillars-of-reasonable-scale-mlops-components">The pillars of reasonable scale MLOps &#8211; components</h3>



<p>Because of all that, <strong>many teams stay away from end-to-end and decide to build a canonical MLOps stack from point solutions</strong> that solve just some parts very well.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="1200" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=1200%2C1200&#038;ssl=1" alt="" class="wp-image-18869" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=768%2C768&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=200%2C200&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=220%2C220&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=88%2C88&amp;ssl=1 88w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=44%2C44&amp;ssl=1 44w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=160%2C160&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=480%2C480&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=1020%2C1020&amp;ssl=1 1020w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Group-1122.jpg?resize=100%2C100&amp;ssl=1 100w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>Potential implementation of the pillars of MLOps</em></figcaption></figure>
</div>


<p>Some of those solutions are in-house tools, some are open-source, and some are third-party SaaS or on-prem tools.</p>



<p>Depending on their use case, they may have something as basic as bash scripts for most of their ML operations and get something more advanced for one area where they need it.</p>



<p><strong>For example:</strong></p>



<ul class="wp-block-list">
<li>You port your models to native mobile apps. You probably don’t need model monitoring but may need advanced model packaging and deployment.</li>



<li>You have complex pipelines with many models working together. Then you probably need some advanced pipelining and orchestration.</li>



<li>You need to experiment heavily with various model architectures and parameters. You probably need a solid experiment tracking tool.</li>
</ul>



<p>By pragmatically focusing on the problems you actually have right now, you don’t overengineer solutions for the future. You deploy those limited resources that you (as a team doing ML at a reasonable scale) have into things that make a difference for your team/business.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-the-pillars-of-reasonable-scale-mlops-principles">The pillars of reasonable scale MLOps &#8211; principles&nbsp;</h3>



<p>There’s also another approach to MLOps pillars that’s worth mentioning. It was brought up by Ciro Greco, Andrea Polonioli, and Jacopo Tagliabue in the article <a href="https://towardsdatascience.com/hagakure-for-mlops-the-four-pillars-of-ml-at-reasonable-scale-5a09bd073da" target="_blank" rel="noreferrer noopener nofollow">Hagakure for MLOps: The Four Pillars of ML at Reasonable Scale</a>. The principles they write about are:&nbsp;</p>



<ul class="wp-block-list">
<li><strong>Data is superior to modeling: </strong>you can often gain more by iterating on data, not models (Andrew Ng talks about it a lot with <a href="https://www.youtube.com/watch?v=06-AZXmwHjo" target="_blank" rel="noreferrer noopener nofollow">”data-centric AI”)</a></li>



<li><strong>Log then transform</strong>: you should separate data ingestion (getting raw data) from data processing to get reproducibility and replayability. You can get that, for example with <a href="https://www.snowflake.com/" target="_blank" rel="noreferrer noopener nofollow">Snowflake</a> + <a href="https://www.getdbt.com/" target="_blank" rel="noreferrer noopener nofollow">dbt</a>&nbsp;</li>



<li><strong>PaaS &amp; FaaS is preferable to IaaS: </strong>You have limited resources. Focus them where you are making a difference. Instead of building and maintaining every component of the stack, use fully-managed services where you can. Your team’s time is the real cost here, not the subscription.&nbsp;</li>



<li><strong>Vertical cuts deeper than distributed:</strong> in most cases, you don’t really need distributed computing architecture. You can use containerized, cloud-native scaling.&nbsp;</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="1200" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=1200%2C1200&#038;ssl=1" alt="" class="wp-image-20168" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=768%2C768&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=200%2C200&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=220%2C220&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=88%2C88&amp;ssl=1 88w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=44%2C44&amp;ssl=1 44w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=160%2C160&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=480%2C480&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=1020%2C1020&amp;ssl=1 1020w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Reasonable-scale-principles.jpg?resize=100%2C100&amp;ssl=1 100w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>The reasonable scale principles | Inspired by <a href="https://towardsdatascience.com/hagakure-for-mlops-the-four-pillars-of-ml-at-reasonable-scale-5a09bd073da" target="_blank" rel="noreferrer noopener nofollow">Hagakure for MLOps: The Four Pillars of ML at Reasonable Scale</a></em></figcaption></figure>
</div>


<h2 class="wp-block-heading" class="wp-block-heading" id="h-best-practices-and-tips-for-setting-up-mlops-at-a-reasonable-scale">Best practices and tips for setting up MLOps at a reasonable scale</h2>



<p>Okay, we’ve talked about the pillars of <a href="https://neptune.ai/blog/mlops-principles" target="_blank" rel="noreferrer noopener">MLOps and the principles of how to approach them</a>. Now it’s time for the more practical part. You’re probably wondering:</p>



<p><strong>How do reasonable scale companies actually set it up (and how should you do it)?</strong>&nbsp;</p>



<p>Here are the resources that will help you build a pragmatic MLOps stack for your use case.&nbsp;</p>



<p>Let’s start with some tips.&nbsp;</p>



<p>Recently we <a href="/blog/tips-for-mlops-setup" target="_blank" rel="noreferrer noopener">interviewed a few ML practitioners about setting up MLOps</a>.</p>



<p>Lots of good stuff in there, but there was this one thought I just had to share with you:</p>



<p><em>“My number 1 tip is that MLOps is not a tool. It is not a product. It describes attempts to automate and simplify the process of building AI-related products and services.&nbsp;</em></p>



<p><em>Therefore,</em><strong><em> spend time defining your process, then find tools</em></strong><em> and techniques that fit that process.&nbsp;</em></p>



<p><em>For example, the process in a bank is wildly different from that of a tech startup. So the resulting MLOps practices and stacks end up being very different too.” – Phil Winder, CEO at Winder Research</em></p>



<p>So before everything, <strong>be pragmatic and think about your use case, your workflow, your needs.</strong> Not “industry best practices”.&nbsp;&nbsp;</p>



<p>I keep coming back to <em>Jacopo Tagliabue</em>, <em>Head of AI at Coveo, </em>but the fact is that no reasonable scale ML discussion is complete without him<em> </em>(after all, he’s the one who coined the term, right?). In his <a href="https://towardsdatascience.com/mlops-without-much-ops-d17f502f76e8" target="_blank" rel="noreferrer noopener nofollow">pivotal blog post</a>, Jacopo suggests a mindset shift that we think is crucial (especially early in your MLOps journey):&nbsp;</p>



<p><em>“to be ML productive at a reasonable scale, you should </em><strong><em>invest your time in your core problems</em></strong><em> (whatever that might be) and buy everything else.”</em></p>



<p>You can watch him go deep into the subject in this <a href="https://www.youtube.com/watch?v=Ndxpo4PeEms" target="_blank" rel="noreferrer noopener nofollow">Stanford Sys seminar video</a>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="ML Ops at Reasonable Scale feat. Jacopo Tagliabue | Stanford MLSys Seminar Episode 35" width="500" height="281" src="https://www.youtube.com/embed/Ndxpo4PeEms?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>The third tip I want you to remember comes from Orr Shilon, ML engineering team lead at Lemonade.&nbsp;</p>



<p>In this <a href="https://open.spotify.com/episode/6v1eDLc1PkQPzgzkxzBJXA?si=47a80c9f2c334baf" target="_blank" rel="noreferrer noopener nofollow">episode of mlops.community podcast</a>, he talks about <strong>platform thinking.</strong></p>



<figure class="wp-block-embed is-type-rich is-provider-spotify wp-block-embed-spotify wp-embed-aspect-21-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Spotify Embed: Platform Thinking: A Lemonade Case Study // Orr Shilon // MLOps Coffee Sessions #79" style="border-radius: 12px" width="100%" height="152" frameborder="0" allowfullscreen allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy" src="https://open.spotify.com/embed/episode/6v1eDLc1PkQPzgzkxzBJXA?si=47a80c9f2c334baf&#038;utm_source=oembed"></iframe>
</div></figure>



<p>He suggests that their<strong> focus on automation and pragmatically leveraging tools wherever possible</strong> were key to doing things efficiently in MLOps.</p>



<p>With this approach, at one point, his team of two ML engineers managed to support the entire data science team of 20+ people. That is some infrastructure leverage.&nbsp;</p>



<p>One more place whit great insights about setting up your MLOps is one of the MLOps community meetups with Andy McMahon, titled <a href="https://mlops.community/watch/just-build-it-tips-for-making-ml-engineering-and-mlops-real_kiSp277D4ihFcm/" target="_blank" rel="noreferrer noopener nofollow">“Just Build It! Tips for Making ML Engineering and MLOps Real”</a>. Andy talks about:</p>



<ul class="wp-block-list">
<li>Where to start when you want to operationalize your ML models?&nbsp;</li>



<li>What comes first &#8211; process or tooling?&nbsp;</li>



<li>How to build and organize an ML team?</li>



<li>…and much more</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Just Build It! Tips for Making ML Engineering and MLOps Real // Andy McMahon // MLOps Meetup #91" width="500" height="281" src="https://www.youtube.com/embed/l1uhE9fEfo8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>It’s a great overview of what he learned when doing all these things in real life. Many valuable lessons there.&nbsp;</p>



<p>Now, let’s look at example MLOps stacks!</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-mlops-tool-stacks">MLOps tool stacks</h2>



<p>There are many tools that play in many MLOps categories though it is sometimes hard to understand who does what.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1920" height="623" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=1920%2C623&#038;ssl=1" alt="Landcape-MLOps" class="wp-image-18821" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=1920%2C623&amp;ssl=1 1920w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=768%2C249&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=200%2C65&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=1536%2C498&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=2048%2C664&amp;ssl=1 2048w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=220%2C71&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=120%2C39&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=160%2C52&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=300%2C97&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=480%2C156&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?resize=1020%2C331&amp;ssl=1 1020w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Landcape-MLOps.jpg?w=3000&amp;ssl=1 3000w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>MLOps tools landscape | Credit: neptune.ai</em></figcaption></figure>
</div>


<p>From our research into how reasonable scale teams set up their stacks, we found out that:&nbsp;</p>



<p><strong>Pragmatic teams don’t do everything. They focus on what they actually need.&nbsp;</strong></p>



<p>For example, the team over at Continuum Industries needed to get a lot of visibility into testing and evaluation suites of their optimization algorithms.&nbsp;</p>



<p>So they connected <a href="/blog/mlops-tool-stack-continuum-industries">Neptune with GitHub actions CICD to visualize and compare various test runs</a>.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="628" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=1200%2C628&#038;ssl=1" alt="Continuum industries MLOps Tool Stack" class="wp-image-18584" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Continuum-industries-MLOps-Tool-Stack-1.jpg?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>Continuum Industries tool stack | Credit: neptune.ai</em></figcaption></figure>
</div>


<p>GreenSteam needed something that would work in a hybrid monolith-microservice environment.</p>



<p>Because of their custom deployment needs, <a href="https://neptune.ai/blog/mlops-at-greensteam-shipping-machine-learning-case-study">they decided to go with Argo pipelines for workflow orchestration and deploy things with FastAPI.&nbsp;</a></p>



<p>Their stack:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1920" height="1005" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=1920%2C1005&#038;ssl=1" alt="" class="wp-image-20169" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=1920%2C1005&amp;ssl=1 1920w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=1536%2C804&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=2048%2C1072&amp;ssl=1 2048w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/04/Greensteam-MLOps-Tool-Stack.jpg?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption"><em>GreenSteam tool stack | Credit: neptune.ai</em></figcaption></figure>
</div>


<p>Those teams didn’t solve everything deeply but pinpointed what they needed and did that very well.&nbsp;&nbsp;</p>



<p>There are more reasonable scale teams among our customers, here are some case studies that are worth checking:&nbsp;</p>



<ul class="wp-block-list">
<li><a href="https://neptune.ai/customers/zoined">Zoined </a>talks about scalable ML workflow with only a few Data Scientists &amp; ML Engineers&nbsp;</li>



<li><a href="/customers/hypefactors" target="_blank" rel="noreferrer noopener">Hypefactors </a>talks about how to manage the process with a variable number of ML experiments</li>



<li><a href="/customers/deepsense-ai">Deepsense.ai </a>talks about finding a way to keep track of over 100k models&nbsp;</li>



<li><a href="/customers/brainly" target="_blank" rel="noreferrer noopener">Brainly</a> talks about managing their experiments when working with SageMaker Pipelines</li>



<li><a href="/customers/instadeep" target="_blank" rel="noreferrer noopener">InstaDeep</a> talks about building a research-friendly and team-friendly process &amp; stack&nbsp;</li>
</ul>



<p>If you’d like to see more examples of how reasonable scale teams set up their MLOps, check these articles:&nbsp;</p>



<ul class="wp-block-list">
<li><a href="https://monzo.com/blog/2022/04/26/monzos-machine-learning-stack" target="_blank" rel="noreferrer noopener nofollow">Monzo’s machine learning stack</a> by Neil Lathia</li>



<li><a href="https://inside.getyourguide.com/blog/2021/3/3/-open-source-ml-platform-with-a-modern-ci-cd-pipeline-and-mlflow" target="_blank" rel="noreferrer noopener nofollow">Laying the foundation of our open source ML platform with a modern CI/CD pipeline </a>by Theodore Meynard</li>



<li><a href="https://towardsdatascience.com/the-road-to-a-serverless-ml-pipeline-in-production-part-i-893f3bf0062a" target="_blank" rel="noreferrer noopener nofollow">The Road to a Serverless ML Pipeline in Production</a> by Gal Shen</li>



<li><a href="https://neptune.ai/blog/how-these-8-companies-implement-mlops" target="_blank" rel="noreferrer noopener nofollow">How These 8 Companies Implement MLOps: In-Depth Guide</a> by our Developer Advocate, Stephen Oladele who did a great job researching and writing down setups of 8 more companies (some are reasonable scale, and some are hyperscale)</li>
</ul>



<p>Also, if you want to go deeper, there is a slack channel where people share and <strong>discuss their MLOps stacks.&nbsp;</strong></p>



<p>Here’s how you can join it:</p>



<ul class="wp-block-list">
<li><a href="https://go.mlops.community/slack" target="_blank" rel="noreferrer noopener nofollow">Join mlops.community slack&nbsp;</a></li>



<li>Find the <strong>#pancake-stacks</strong> channel</li>



<li>While at it, come say hi in the <strong>#neptune-ai</strong> channel and ask us about this article, MLOps, or whatever else</li>
</ul>



<p>Okay, stacks are great, but you probably want some templates, too.&nbsp;</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-mlops-templates">MLOps templates</h2>



<p>The best reasonable scale MLOps template comes from, you guessed it, Jacopo Tagliabue and collaborators.&nbsp;</p>



<p>In<a href="https://github.com/jacopotagliabue/you-dont-need-a-bigger-boat" target="_blank" rel="noreferrer noopener nofollow"> this open-source GitHub repository</a>, they put together an end-to-end (Metaflow-based) implementation of an intent prediction and session recommendation.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-1.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-1.png?ssl=1" alt="MLOps template" class="wp-image-67260"/></a><figcaption class="wp-element-caption"><em><em>MLOps template | Source: <a href="https://github.com/jacopotagliabue/you-dont-need-a-bigger-boat" target="_blank" rel="noreferrer noopener nofollow">You Don&#8217;t Need a Bigger Boat</a></em></em></figcaption></figure>
</div>


<p>It shows how to connect the <a href="https://towardsdatascience.com/hagakure-for-mlops-the-four-pillars-of-ml-at-reasonable-scale-5a09bd073da#:~:text=The%20four%20pillars%20of%20ML%20at%20Reasonable%20Scale,-Photo%20by%20Jeremy&amp;text=%E4%B8%80%20Data%20is%20superior%20to,Vertical%20cuts%20deeper%20than%20distributed." target="_blank" rel="noreferrer noopener nofollow">main pillars of MLOps</a> and have an end-to-end working MLOps system you can build on. It is an excellent starting point that lets you use the default or pick and choose tools for each component.&nbsp;</p>



<p>Another great resource that is worth mentioning is the <a href="https://ml-ops.org/content/state-of-mlops" target="_blank" rel="noreferrer noopener nofollow">MLOps Infrastructure Stack article.&nbsp;</a></p>



<p>In that article, they explain how:&nbsp;</p>



<p><strong><em>“MLOps must be language-, framework-, platform-, and infrastructure-agnostic practice. MLOps should follow a “convention over configuration” implementation.”</em></strong></p>



<p>It comes with a nice graphical template from folks over at <a href="https://valohai.com/" target="_blank" rel="noreferrer noopener nofollow">Valohai</a>.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-2.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-2.png?ssl=1" alt="MLOps template" class="wp-image-67261" style="width:750px;height:768px"/></a><figcaption class="wp-element-caption"><em><em>MLOps template | Source <a href="https://valohai.com/" target="_blank" rel="noreferrer noopener nofollow">Valohai</a></em></em></figcaption></figure>
</div>


<p>They explain general considerations, tool categories, and example tool choices for each component. Overall a really good read.&nbsp;</p>



<p><a href="https://mymlops.com/" target="_blank" rel="noreferrer noopener nofollow">MyMLOps</a> gives you a browser-based tool stack builder that talks briefly about what tools do and in which categories they play. You can also share your stack with others.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Zrzut-ekranu-Deepin_wybierz-obszar_20220711213949.png?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Zrzut-ekranu-Deepin_wybierz-obszar_20220711213949.png?ssl=1" alt="" class="wp-image-68657"/></a><figcaption class="wp-element-caption"><em>MLOps template | Source <a href="https://mymlops.com/" target="_blank" rel="noreferrer noopener nofollow">MyMLOps</a></em></figcaption></figure>
</div>


<p>One more template from Jacopo Tagliabue. This one is specifically for recommender systems &#8211; <a href="https://github.com/jacopotagliabue/recs-at-resonable-scale" target="_blank" rel="noreferrer noopener nofollow">Recs at reasonable scale</a>. It was created in an effort to release as open source code a realistic data and ML pipeline for cutting-edge recommender systems &#8220;that just work&#8221;.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-4.jpg?ssl=1"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/MLOps-template-4.jpg?ssl=1" alt="MLOps template recommender system" class="wp-image-70130"/></a><figcaption class="wp-element-caption"><em>MLOps template for recommender systems | <a href="https://github.com/jacopotagliabue/recs-at-resonable-scale" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>You may also look into some of our resources for choosing tools for a particular component of the stack:</p>



<ul class="wp-block-list">
<li><a href="/blog/best-mlops-tools" target="_blank" rel="noreferrer noopener">The Best MLOps Tools and How to Evaluate Them</a></li>



<li><a href="/blog/data-labeling-software">Best Tools For Data Labeling</a></li>



<li><a href="/blog/the-best-tools-for-machine-learning-model-visualization" target="_blank" rel="noreferrer noopener">The Best Tools for Machine Learning Model Visualization</a></li>



<li><a href="/blog/best-tools-for-model-tuning-and-hyperparameter-optimization" target="_blank" rel="noreferrer noopener">Best Tools for Model Tuning and Hyperparameter Optimization</a></li>



<li><a href="/blog/best-ml-experiment-tracking-tools" target="_blank" rel="noreferrer noopener">15 Best Tools for ML Experiment Tracking and Management</a></li>



<li><a href="/blog/ml-model-serving-best-tools" target="_blank" rel="noreferrer noopener">Best Tools to Do ML Model Serving</a></li>



<li><a href="/blog/best-8-machine-learning-model-deployment-tools" target="_blank" rel="noreferrer noopener">Best 8 Machine Learning Model Deployment Tools</a></li>



<li><a href="/blog/best-workflow-and-pipeline-orchestration-tools" target="_blank" rel="noreferrer noopener">Best Workflow and Pipeline Orchestration Tools</a></li>



<li><a href="/blog/best-data-version-control-tools" target="_blank" rel="noreferrer noopener">Best 7 Data Version Control Tools</a></li>



<li><a href="/blog/top-model-versioning-tools">Top Model Versioning Tools for Your ML Workflow</a></li>



<li><a href="/blog/ml-model-monitoring-best-tools" target="_blank" rel="noreferrer noopener">Best Tools to Do ML Model Monitoring</a></li>



<li><a href="/blog/continuous-integration-continuous-deployment-tools-for-machine-learning" target="_blank" rel="noreferrer noopener">CI/CD Tools for Machine Learning</a></li>



<li>… <a href="/blog/category/machine-learning-tools" target="_blank" rel="noreferrer noopener">and more articles about tools</a>.</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-what-should-you-do-next">What should you do next?</h2>



<p>Okay, now use this knowledge and go build your MLOps stack!</p>



<p>We’ve gathered here quite a lot of resources that should help you. But if you have specific questions on the way or just want to dig deeper into the topic, here’s even more useful stuff.&nbsp;</p>



<ul class="wp-block-list">
<li><a href="https://mlops.community/" target="_blank" rel="noreferrer noopener nofollow">MLOps Community</a> &#8211; I may be repeating myself, but that’s definitely the best MLOps community out there. Almost 10k practitioners in one place, asking questions, sharing knowledge, and just talking to each other about all things MLOps.&nbsp;</li>



<li>Apart from the very active Slack channel, <a href="https://open.spotify.com/show/7wZygk3mUUqBaRbBGB1lgh?si=c66412e52dd740d8" target="_blank" rel="noreferrer noopener nofollow">MLOps Community also runs a podcast,</a> organizes meetups and reading groups, and sends newsletters. Make sure to check all these resources.&nbsp;</li>



<li><a href="/events" target="_blank" rel="noreferrer noopener">MLOps Live</a> &#8211; It’s a biweekly event organized by us, neptune.ai, where ML practitioners answer questions from other ML practitioners about one chosen subject related to MLOps. You can watch previous episodes on <a href="https://www.youtube.com/playlist?list=PLKePQLVx9tOczB07_oyDkdQqdNiqLV-zX" target="_blank" rel="noreferrer noopener nofollow">YouTube</a> or listen to them as a <a href="https://mlopspod.com/" target="_blank" rel="noreferrer noopener nofollow">podcast</a>.&nbsp;</li>



<li>Personal blogs of ML folks &#8211; Many ML practitioners have their own blogs, which we highly recommend as well. Make sure to follow e.g. <a href="https://huyenchip.com/" target="_blank" rel="noreferrer noopener nofollow">Chip Huyen</a>, <a href="https://eugeneyan.com/" target="_blank" rel="noreferrer noopener nofollow">Eugene Yan</a>, <a href="https://www.jeremyjordan.me/" target="_blank" rel="noreferrer noopener nofollow">Jeremy Jordan</a>, <a href="https://www.shreya-shankar.com/" target="_blank" rel="noreferrer noopener nofollow">Shreya Shankar</a>, or <a href="https://laszlo.substack.com/" target="_blank" rel="noreferrer noopener nofollow">Laszlo Sranger</a>. You can also check the <a href="https://outerbounds.com/about/" target="_blank" rel="noreferrer noopener nofollow">Outerbounds </a>blog.</li>



<li><a href="/blog" target="_blank" rel="noreferrer noopener">MLOps Blog </a>&#8211; Our own blog is also full of MLOps-related articles written by Data Scientists and ML Engineers who work in the industry. You’ll find pieces covering best practices, tools, real-life MLOps pipelines, and much more. Here are a few articles I think you should start with:
<ul class="wp-block-list">
<li><a href="/blog/model-deployment-challenges-lessons-from-ml-engineers" target="_blank" rel="noreferrer noopener">Model Deployment Challenges: 6 Lessons From 6 ML Engineers</a></li>



<li><a href="/blog/ml-model-testing-teams-share-how-they-test-models" target="_blank" rel="noreferrer noopener">ML Model Testing: 4 Teams Share How They Test Their Models</a></li>



<li><a href="/blog/ways-ml-teams-use-ci-cd-in-production" target="_blank" rel="noreferrer noopener">4 Ways Machine Learning Teams Use CI/CD in Production</a></li>
</ul>
</li>



<li><a href="https://medium.com/towards-data-science" target="_blank" rel="noreferrer noopener nofollow">Towards Data Science</a> &#8211; Probably an obvious resource, but you can find a lot of gold there when it comes to reasonable scale ML teams sharing their solutions and practices.&nbsp;</li>



<li><a href="https://www.applyconf.com/" target="_blank" rel="noreferrer noopener nofollow">apply(conf)</a> &#8211; Although there are speakers from hyperscale companies as well, this conference gives a lot of space in their agenda to reasonable scale teams. It’s one of the favorite events of the ML community, so there must be a reason for that.&nbsp;</li>



<li>Awesome MLOps GitHub repos &#8211; There are actually two repos with this name &#8211; <a href="https://github.com/visenger/awesome-mlops" target="_blank" rel="noreferrer noopener nofollow">here </a>and <a href="https://github.com/kelvins/awesome-mlops" target="_blank" rel="noreferrer noopener nofollow">here</a>. They list everything from articles, books, and papers, to tools, newsletters, podcasts, and events.</li>



<li>If you’d like to take a step back, or you’re just starting to learn about MLOps, no worries. There’s something for everyone. You can check one of the courses: <a href="https://www.coursera.org/learn/mlops-fundamentals?utm_source=gg&amp;utm_medium=sem&amp;utm_content=01-CatalogDSA-ML2-US&amp;campaignid=12490862811&amp;adgroupid=119269357576&amp;device=c&amp;keyword=&amp;matchtype=&amp;network=g&amp;devicemodel=&amp;adpostion=&amp;creativeid=503940597764&amp;hide_mobile_promo&amp;gclid=CjwKCAjwp7eUBhBeEiwAZbHwkT2LvyxTJrO_ZjFy5mMvtUjNAe0W0lwWessNe1G2OJGTbLPegZwe2RoC2d0QAvD_BwE" target="_blank" rel="noreferrer noopener nofollow">MLOps Fundamentals</a> on Coursera, <a href="https://github.com/DataTalksClub/mlops-zoomcamp" target="_blank" rel="noreferrer noopener nofollow">Zoomcamp</a> organized by DataTalks Club or <a href="https://github.com/GokuMohandas/MLOps" target="_blank" rel="noreferrer noopener nofollow">Made with ML</a>.&nbsp;</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6990</post-id>	</item>
		<item>
		<title>Best 7 Data Version Control Tools That Improve Your Workflow With Machine Learning Projects</title>
		<link>https://neptune.ai/blog/best-data-version-control-tools</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 13:30:12 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/best-data-version-control-tools/</guid>

					<description><![CDATA[Keeping track of all the data you use for models and experiments is not exactly a piece of cake. It takes a lot of time and is more than just managing and tracking files. You need to ensure everybody’s on the same page and follows changes simultaneously to keep track of the latest version. You&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Keeping track of all the data you use for models and experiments is not exactly a piece of cake. It takes a lot of time and is more than just managing and tracking files. You need to ensure everybody’s on the same page and follows changes simultaneously to keep track of the latest version.</p>



<p>You can do that with no effort by using the right software! <strong>A good data version control tool will allow you to have unified data sets with a strong repository of all your experiments.</strong></p>



<p>It will also enable smooth collaboration between all team members so everyone can follow changes in real-time and always know what’s happening.</p>



<p>It’s a great way to systematize data version control, improve workflow, and minimize the risk of occurring errors.</p>



<p>So check out these top tools for data version control that can help you automate work and optimize processes.</p>



<p><strong>Data versioning tools are critical to your workflow if you care about reproducibility, traceability, and ML model lineage.&nbsp;</strong></p>



<p>They help you get a version of an artifact, a hash of the dataset or model that you can use to identify and compare it later. Often you’d log this data version into your metadata management solution to make sure your model training is versioned and reproducible.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-how-to-choose-a-data-versioning-tool">How to choose a data versioning tool?</h2>



<p>To choose a suitable data versioning tool for your workflow, you should check:</p>



<ul class="wp-block-list">
<li><strong>Support for your data modality</strong>: how does it support video/audio? Does it provide some preview for tabular data?</li>



<li><strong>Ease of use</strong>: how easy is it to use in your workflow? How much overhead does it add to your execution?</li>



<li><strong>Diff and compare</strong>: Can you compare datasets? Can you see the diff for your image directory?</li>



<li><strong>How well does it work with your stack</strong>: Can you easily connect to your infrastructure, platform, or model training workflow?</li>



<li><strong>Can you get your team on board</strong>: If your team does not adopt it, it doesn’t matter how good the tool is. So keep your teammates skillset in mind and preferences in mind.&nbsp;</li>
</ul>



<p>Here’re are a few tools worth exploring.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-best-data-version-control-tools">Best data version control tools</h2>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-1-neptune-ai">1. <a href="/" target="_blank" rel="noreferrer noopener">neptune.ai</a></h3>



<div id="app-screenshot-block_eeb979bcbba5f8e21d9766077c26ef90"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Data-versioning-in-Neptune.png?fit=1020%2C517&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Data-versioning-in-Neptune.png?fit=480%2C243&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Data-versioning-in-Neptune.png?fit=768%2C389&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Data-versioning-in-Neptune.png?fit=1020%2C517&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="517"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/common/org/data-versioning/runs/table?viewId=0d305ea6-3257-4193-9bf0-a7eb571343a1&#038;dash=artifacts&#038;compare=IwdgNMQ"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Data versioning in Neptune			</figcaption>
			
</div>



<div id="separator-block_4c8f7a74046711c791023d5e54c2046d"
         class="block-separator block-separator--15">
</div>



<p><a href="/" target="_blank" rel="noreferrer noopener">Neptune</a> is the most scalable experiment tracker designed with a strong focus on teams that train foundation models. It lets you monitor months-long model training, track massive amounts of data, and compare thousands of metrics in the blink of an eye.</p>



<p>You can log and display pretty much any ML metadata from hyperparameters and metrics to videos, interactive visualizations, and <strong>data versions</strong>.</p>



<p>Neptune artifacts let you version datasets, models, and other files from your local filesystem or any S3-compatible storage with a single line of code. Specifically, it saves:</p>



<ul class="wp-block-list">
<li><strong>Version</strong> (hash) for the file or folder</li>



<li><strong>Location</strong> of the file or folder</li>



<li>Folder <strong>structure</strong> (recursively)</li>



<li><strong>Size</strong> of the file or folder&nbsp;&nbsp;</li>
</ul>



<p>Once logged, you can use Neptune UI to group runs on dataset versions or see how the artifacts changed between runs.&nbsp;&nbsp;</p>



<p><strong>When it comes to data versioning, Neptune is a very lightweight solution,</strong> and you can get going quickly. That said, it may not give you everything you need data-versioning-wise.&nbsp;</p>



<p>If you are wondering if it will fit your workflow:</p>



<ul class="wp-block-list">
<li>check out the <a href="https://docs.neptune.ai/" target="_blank" rel="noreferrer noopener">documentation</a></li>



<li>check out <a href="/customers" target="_blank" rel="noreferrer noopener">case studies of how people set up their MLOps tool stack</a> with Neptune</li>



<li>explore an <a href="https://app.neptune.ai/o/common/org/data-versioning/runs/table?viewId=0d305ea6-3257-4193-9bf0-a7eb571343a1&amp;dash=artifacts&amp;compare=IwdgNMQ" target="_blank" rel="noreferrer noopener nofollow">example public project about dataset versioning</a></li>



<li>or if you are like me and would like to compare it to other tools in the space like DVC, Pachyderm, or wandb. So here<a previewlistener="true" href="/vs" target="_blank" rel="noreferrer noopener"> are many deeper feature-by-feature comparisons</a> to make the evaluation easier.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-2-pachyderm">2. <a href="https://www.pachyderm.com/" target="_blank" rel="noreferrer noopener nofollow">Pachyderm</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/11.-Pachyderm.png?ssl=1" alt="pachyderm" class="wp-image-15185"/></figure>
</div>


<p>Pachyderm is a complete version-controlled data science platform that helps to control an end-to-end machine learning life cycle. It comes in three different versions, Community Edition (open-source, with the ability to be deployed anywhere), Enterprise Edition (complete version-controlled platform), and Hub Edition (a hosted version, still in beta).</p>



<p>It’s a great platform for <strong>flexible collaboration</strong> on any kind of machine learning project.</p>



<p><strong>Here’s what you can do with Pachyderm as a data version tool:</strong></p>



<ul class="wp-block-list">
<li>Pachyderm lets you continuously update data in the master branch of your repo, while experimenting with specific data commits in a separate branch or branches</li>



<li>It supports any type, size, and number of files including binary and plain text files</li>



<li>Pachyderm commits are centralized and transactional</li>



<li>Provenance enables teams to build on each other work, share, transform, and update datasets while automatically maintaining a complete audit trail so that all results are reproducible</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-3-dvc">3. <a href="https://dvc.org/" target="_blank" rel="noreferrer noopener nofollow">DVC</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/15.-DVC.png?ssl=1" alt="dvc" class="wp-image-15191" style="width:768px;height:404px"/></figure>
</div>


<p>DVC is an open-source version control system for machine learning projects. It’s a tool that lets you define your pipeline regardless of the language you use.</p>



<p>When you find a problem in a previous version of your ML model, DVC saves your time by leveraging code data, and pipeline versioning, to give you reproducibility. You can also train your model and share it with your teammates via DVC pipelines.</p>



<p>DVC can cope with versioning and organization of big amounts of data and store them in a well-organized, accessible way. It focuses on data and pipeline versioning and management but also has some (limited) experiment tracking functionalities.</p>



<p><strong>DVC – summary:</strong></p>



<ul class="wp-block-list">
<li>Possibility to use different types of storage— it’s storage agnostic</li>



<li>Full code and data provenance help to track the complete evolution of every ML model</li>



<li>Reproducibility by consistently maintaining a combination of input data, configuration, and the code that was initially used to run an experiment</li>



<li>Tracking metrics</li>



<li>A built-in way to connect ML steps into a DAG and run the full pipeline end-to-end</li>



<li>Tracking failed attempts</li>



<li>Runs on top of any Git repository and is compatible with any standard Git server or provider</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-4-git-lfs">4. <a href="https://git-lfs.github.com/" target="_blank" rel="noreferrer noopener nofollow">Git LFS</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Git-LFS.png?ssl=1" alt="git lfs" class="wp-image-32633"/></figure>
</div>


<p>Git Large File Storage (LFS) is an open-source project. It <strong>replaces large files</strong> such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.</p>



<p>It allows you to <strong>version large files</strong>—even those as large as a couple GB in size—<strong>with Git</strong>, <strong>host more</strong> in your Git repositories with external storage, and to <strong>faster clone and fetch</strong> from repositories that deal with large files.</p>



<p>At the same time, you can keep your workflow and the same access controls and permissions for large files as the rest of your Git repository when working with a remote host like GitHub.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-5-dolt">5. <a href="https://github.com/dolthub/dolt" target="_blank" rel="noreferrer noopener nofollow">Dolt</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/dolthub_intro_sql_console_open.png?ssl=1" alt="DoltHub" class="wp-image-32635"/></figure>
</div>


<p>Dolt is a SQL database that you can <em>fork, clone, branch, merge, push, and pull</em> just like a git repository. Dolt allows data and schema to evolve together to <strong>make a version control database a better experience</strong>. It&#8217;s a great tool to collaborate on with your team.</p>



<p>You can freely connect to Dolt just like to any MySQL database to run queries or update the data using SQL commands.&nbsp;</p>



<p>Use the command line interface to import CSV files, commit your changes, push them to a remote, or merge your teammate&#8217;s changes.</p>



<p>All the commands you know for Git work exactly the same for Dolt. Git versions files, Dolt versions tables.</p>



<p>There’s also <a href="https://www.dolthub.com/" target="_blank" rel="noreferrer noopener nofollow"><strong>DoltHub </strong></a>&#8211; a place to share Dolt databases.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-6-lakefs">6. <a href="https://lakefs.io/" target="_blank" rel="noreferrer noopener nofollow">lakeFS</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/lakeFS.png?ssl=1" alt="lakefs" class="wp-image-32636"/></figure>
</div>


<p>lakeFS is an open-source platform that provides a Git-like branching and committing model that scales to Petabytes of data by utilizing S3 or GCS for storage.</p>



<p>This branching model makes your data lake ACID-compliant by allowing changes to happen in isolated branches that can be created, merged, and rolled back atomically and instantly.</p>



<p>lakeFS has three main areas that let you focus on differen aspect of your ML models:</p>



<ol class="wp-block-list">
<li><strong>Development Environment for Data:</strong> has tools that you can use to isolate snapshot of the lake you can experiment with while others are not exposed; reproducibility to compare changes and improve experiments</li>



<li><strong>Continuous Data Integration:</strong> entering and managing data according to your own rules</li>



<li><strong>Continuous Data Deployment:</strong> ability to quickly revert changes to data; providing consistency in your datasets; testing of production data to avoid cascading quality issues</li>
</ol>



<p>lakeFS is a great tool for focusing on a specific area of your datasets to make ML experiments more consistent.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-7-delta-lake">7. <a href="https://delta.io/" target="_blank" rel="noreferrer noopener nofollow">Delta Lake</a></h3>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/delta-lake.png?ssl=1" alt="delta lake" class="wp-image-32632" style="width:768px;height:517px"/></figure>
</div>


<p>Delta Lake is an open-source storage layer that brings<strong> reliability to data lakes</strong>. Delta Lake provides ACID transactions, scalable metadata handling, and unifies streaming and batch data processing. It runs on top of your existing data lake and is fully compatible with Apache Spark APIs.</p>



<p><strong>Delta Lake &#8211; summary:</strong></p>



<ul class="wp-block-list">
<li><strong>Scalable metadata handling</strong>: Leverages Spark’s distributed processing power to handle all the metadata for petabyte-scale tables with billions of files at ease.</li>



<li><strong>Streaming and batch unification</strong>: A table in Delta Lake is a batch table as well as a streaming source and sink. Streaming data ingest, batch historic backfill, interactive queries all just work out of the box.</li>



<li><strong>Schema enforcement</strong>: Automatically handles schema variations to prevent insertion of bad records during ingestion.</li>



<li><strong>Serializable isolation </strong>levels ensure that readers never see inconsistent data.</li>



<li><strong>Data versioning enables rollbacks, full historical audit trails, and reproducible machine learning experiments</strong></li>



<li><strong>Supports merge, update,</strong> and delete operations to enable complex use cases like change-data-capture, slowly-changing-dimension (SCD) operations, streaming upserts, and so on.</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-to-wrap-it-up">To wrap it up</h2>



<p>Now that you have the list of the best tools for data versioning, you “just” need to figure out how to make it work for you and your team.</p>



<p>That can be tricky.&nbsp;</p>



<p>Some things to consider when choosing a data versioning are:</p>



<ul class="wp-block-list">
<li><strong>How easy is it to set up</strong>: You may not have the time, needs, or budget to test something heavy right now.&nbsp;</li>



<li><strong>Can you get your team onboard</strong>: Sometimes, the solution is great, but you need more software engineering-oriented mindset to use it. Some ML researchers or data scientists may not end up using it.&nbsp;&nbsp;</li>



<li><strong>What tool stack are you using today</strong>: Are you using specific tools, infrastructure, or platform that has good integration with a particular data versioning solution. In that case, probably the best option is to just go with that.&nbsp;</li>



<li><strong>Data modality</strong>: Is it images, tables, text, all? Sometimes the tool doesn’t support your modality very well as it was built with a different use case in mind.&nbsp;</li>
</ul>



<p>If you’d like to talk about choosing it or setting up your MLOps stack, I’d love to help.</p>



<p><a href="mailto:jakub.czakon@neptune.ai" target="_blank" rel="noreferrer noopener nofollow">Reach out to me</a>, and let’s see what I can do!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3211</post-id>	</item>
		<item>
		<title>ML Experiment Tracking: What It Is, Why It Matters, and How to Implement It</title>
		<link>https://neptune.ai/blog/ml-experiment-tracking</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 13:24:23 +0000</pubDate>
				<category><![CDATA[ML Model Development]]></category>
		<category><![CDATA[MLOps]]></category>
		<guid isPermaLink="false">https://neptune.test/ml-experiment-tracking/</guid>

					<description><![CDATA[Let me share a story that I’ve heard too many times - "… So far, we have been doing everything manually and sort of ad hoc. Some people are using it, some people are using that, it’s all over the place. We don’t have anything standardized. But we run many projects, the team is growing, and we are scaling pretty fast. So we run into a lot of problems. How was the model trained? On what data? What parameters did we use for different versions? How can we reproduce them? We just feel the need to control our experiments…" - unfortunate Data Scientist. The truth is, when you develop ML models, you will run lots of experiments...]]></description>
										<content:encoded><![CDATA[
<p>Let me share a story that I’ve heard too many times.</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        … So far, we have been doing everything manually and sort of ad hoc. <br />
<br />
Some people are using it, some people are using that, it’s all over the place.<br />
<br />
We don’t have anything standardized.<br />
<br />
But we run many projects, the team is growing, and we are scaling pretty fast.<br />
<br />
So we run into a lot of problems. How was the model trained? On what data? What parameters did we use for different versions? How can we reproduce them?<br />
<br />
We just feel the need to control our experiments…
                    <cite class="c-cite">

                <span class="c-cite__name">unfortunate Data Scientist</span>

                
            </cite>
            </div>

    
</blockquote>



<p>The truth is, when you develop ML models, you will run lots of experiments.</p>



<p>And those experiments may</p>



<ul class="wp-block-list">
<li>use different models and model hyperparameters,</li>



<li>use different training or evaluation data,&nbsp;</li>



<li>run different code (including that one small change you wanted to test the other day)</li>



<li>run the same code in a different environment (not knowing which PyTorch or Tensorflow version was installed).</li>
</ul>



<p>As a result, each of these experiments can produce completely different evaluation metrics.&nbsp;</p>



<p>Keeping track of all that information becomes really difficult really quickly. Especially if you want to organize and compare many experiments and feel confident that you selected the best models to go into production.</p>



<p>This is where <a href="/product/experiment-tracking" target="_blank" rel="noreferrer noopener">experiment tracking</a> comes in.&nbsp;</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-what-is-ml-experiment-tracking">What is ML experiment tracking?</h2>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        Experiment tracking is the process of saving all experiment related information that you care about for every experiment you run.
            </div>

    
</blockquote>



<p>Experiment tracking is the process of saving all experiment-related information that you care about for every experiment you run. What this “information you care about” is will strongly depend on your project.</p>



<p>Generally, this so-called experiment metadata may include:</p>



<ul class="wp-block-list">
<li>Any scripts used for running the experiment</li>



<li>Environment configuration files</li>



<li>Information about the data used for training and evaluation (e.g., dataset statistics and versions)</li>



<li>Model and training parameter configurations</li>



<li>ML evaluation metrics</li>



<li>Model weights</li>



<li>Performance visualizations (e.g., a confusion matrix or <a href="/blog/f1-score-accuracy-roc-auc-pr-auc" target="_blank" rel="noreferrer noopener">ROC curve</a>)&nbsp;</li>



<li>Example predictions on the validation set (common in computer vision)</li>
</ul>



<p>Of course, you want to have this information available after the experiment has finished. But, ideally, you’d like to see some of it already as your experiment is running.&nbsp;</p>



<p>Why?</p>



<p>Because for some experiments, you can see (almost) right away that there is no way they will get you better results. Instead of letting them run (which might take days or weeks), you are better off simply stopping them and trying something different.</p>



<p>To be able to collect, store, and analyze all the data, you need an experiment tracking system in place. Such a system will typically have three components:&nbsp;</p>



<ul class="wp-block-list">
<li><strong>Experiment database</strong> (neptune.ai servers on the visual below): A place where your logged experiment metadata is stored and can be queried.</li>



<li><strong>Client library</strong>: A collection of methods that help you log metadata right from your training scripts and query the experiment database.</li>



<li><strong>Experiment dashboard</strong> (neptune.ai web app on the visual below): A visual interface to your experiment database where you can see your experiment metadata.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1650" height="1650" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=1650%2C1650&#038;ssl=1" alt="Experiment tracking system architecture (based on neptune.ai example)" class="wp-image-33909" style="width:622px;height:auto" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?w=1650&amp;ssl=1 1650w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=768%2C768&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=200%2C200&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=1536%2C1536&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=220%2C220&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=88%2C88&amp;ssl=1 88w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=44%2C44&amp;ssl=1 44w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=160%2C160&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=480%2C480&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=1020%2C1020&amp;ssl=1 1020w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/11/Regular-title-page-1.png?resize=100%2C100&amp;ssl=1 100w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">Experiment tracking system architecture (based on neptune.ai example)</figcaption></figure>
</div>


<p>Of course, you can implement each component in many different ways, but the general picture will be very similar.&nbsp;</p>



<p><em>Wait, so isn’t experiment tracking like MLOps or something?</em></p>


    <a
        href="/blog/building-the-most-scalable-experiment-tracker-for-foundation-models"
        id="cta-box-related-link-block_7341c5041de7815fdf685b09e3855188"
        class="block-cta-box-related-link  l-margin__top--0 l-margin__bottom--0"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-from-research-to-production-building-the-most-scalable-experiment-tracker-for-foundation-models">                From Research to Production: Building The Most Scalable Experiment Tracker For Foundation Models            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-ml-experiment-tracking-vs-mlops">ML experiment tracking vs MLOps</h2>



<p><strong>MLOps deals with every part of the ML project lifecycle,</strong> from developing models by scheduling distributed training jobs, managing model serving, and monitoring the quality of models in production to re-training those models when needed.</p>



<p><strong>Experiment tracking (also referred to as experiment logging) is part of MLOps, focused on supporting iterative <a href="/blog/experiment-management" target="_blank" rel="noreferrer noopener">model development</a>,</strong> the part of the ML project lifecycle where you try many things to get your model performance to the level you need. Experiment tracking is closely intertwined with other aspects of MLOps, such as data and model versioning.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1800" height="942" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=1800%2C942&#038;ssl=1" alt="MLOps cycle and ML experiment tracking" class="wp-image-31085" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?w=1800&amp;ssl=1 1800w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=1536%2C804&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Experiment-tracking.png?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">MLOps cycle and machine learning experiment tracking</figcaption></figure>
</div>


<p><strong>Experiment tracking is useful even if your models don’t make it to production</strong> (yet). In many research-focused projects, you might never even get there. But especially in these projects, having all the metadata about every experiment you run and the ability to analyze it is important.</p>


    <a
        href="/blog/experiment-management"
        id="cta-box-related-link-block_92a9ab14d1c97701b58148ad6d257101"
        class="block-cta-box-related-link  l-margin__top--standard l-margin__bottom--standard"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-experiment-tracking-vs-machine-learning-model-management-vs-mlops">                Experiment Tracking vs Machine Learning Model Management vs MLOps            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<p>Ok, if you are a bit like me, you may be thinking:</p>



<p><em>Cool, so I know what experiment tracking is. &#8230;but why should I care?</em></p>



<p>Let me explain.&nbsp;</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-llms-from-experiment-tracking-to-prompt-tracking">LLMs: from experiment tracking to prompt tracking</h2>



<p>Here’s what our CEO has to say:</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        If you look at the “jobs to be done” of an experiment tracker, it goes way beyond experimenting. It’s not just about research. When you’re building models, you want to understand what’s happening, you want to understand the building process, you want to debug it, you want to compare it with other experiments. In this way, you can understand whether the model you&#8217;re building is going in the right direction or not. You want to version it so you have some level of reproducibility, some way to share a particular model for feedback – and you want to be able to hand the model over to an Ops team.
            </div>

    
</blockquote>



<figure class="wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="From Experiment to Prompt Tracking in MLOps  // Piotr Niedźwiedź // MLOps Podcast #168 clip" width="500" height="281" src="https://www.youtube.com/embed/luN4MEgwx5o?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption"><strong>Listen to what our founding CEO <a href="https://www.linkedin.com/in/piotrniedzwiedz" target="_blank" rel="noreferrer noopener nofollow">Piotr Niedźwiedź</a> had to say about experiment tracking and prompt engineering for LLMs on <a href="http://youtube.com/watch?v=zbkXoONGDGg" target="_blank" rel="noreferrer noopener nofollow">episode 168</a> of the MLOps Community podcast</strong></figcaption></figure>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        When I think about prompt engineering, that’s quite a different way of building models. I&#8217;m not even sure that we should be calling it “engineering” in the sense of a building process because the model is stateless. For the latest models like GPT-4, fine-tuning is not (yet) available. So what you&#8217;re left with is crafting prompts. And you can configure agents and build the prompts in a sequential way using different models. So, yes, it is engineering.<br />
<br />
When we talk about experiment tracking, we’re talking about the building phase and figuring out how a model works. In that spirit, I definitively see support for prompt visualizations and chain visualizations on our roadmap, as well as integration with Langchain. But this is just the beginning! I think that to really support teams that are building Large Language Models and using them in production, we’ll have to support and invent new methods to validate prompts.
            </div>

    
</blockquote>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-why-does-ml-experiment-tracking-matter"><strong>Why does ML experiment tracking matter?&nbsp;&nbsp;</strong></h2>



<p>Building a tool for ML practitioners has one huge benefit. You get to talk to a lot of them.&nbsp;</p>



<p>And after talking to hundreds of people who track their experiments in Neptune, I identified <strong>four ways experiment tracking can improve your workflow.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1200" height="628" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=1200%2C628&#038;ssl=1" alt="4 reasons why ML experiment tracking matters" class="wp-image-18534" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?w=1200&amp;ssl=1 1200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=200%2C105&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=220%2C115&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=120%2C63&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=160%2C84&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=480%2C251&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/4-ways-experiment-tracking-can-make-workflow-better.jpg?resize=1020%2C534&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">4 reasons why machine learning experiment tracking matters</figcaption></figure>
</div>


<h3 class="wp-block-heading" class="wp-block-heading" id="h-all-of-your-ml-experiments-and-models-are-organized-in-a-single-place"><strong>All of your ML experiments and models are organized in a single place</strong></h3>



<p>There are many ways to run your ML experiments or model training jobs:</p>



<ul class="wp-block-list">
<li>Personal laptop</li>



<li>PC at work</li>



<li>A dedicated instance in the cloud</li>



<li>University cluster</li>



<li>Kaggle kernel or Google Colab</li>



<li>and many more …</li>
</ul>



<p>Sometimes, you just want to test something quickly and run an experiment in a notebook. Sometimes, you need to spin up a distributed <a href="/blog/hyperparameter-tuning-in-python-complete-guide" target="_blank" rel="noreferrer noopener">hyperparameter tuning</a> job.&nbsp;</p>



<p>Either way, over the course of a project (especially when several people are working on it), <strong>you can end up with experiment results scattered</strong> across multiple machines.</p>



<p>With an <strong>experiment tracking system,</strong> all of your experiment <strong>results are logged to one experiment repository by design.</strong> Keeping all of your experiment metadata in a single place, regardless of where you run them, makes your experimentation process so much easier to manage.</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        [experiment tracking system] allows us to keep all of our experiments organized in a single space. Being able to see my team’s work results any time I need makes it effortless to track progress and enables easier coordination.
                    <cite class="c-cite">

                <span class="c-cite__name">Michael Ulin</span>

                                    <span class="c-cite__company">VP of Machine Learning at Zesty.ai</span>
                
            </cite>
            </div>

    
</blockquote>



<p>A centralized experiment repository makes it easy to:</p>



<ul class="wp-block-list">
<li>Search and filter experiments to find the information you need quickly</li>



<li>Compare metrics and parameters between experiments with no additional work</li>



<li>Drill down and see what exactly it was that you tried (code, data versions, architectures)&nbsp;</li>



<li>Reproduce or re-run experiments when you need to</li>



<li>Access experiment metadata even when you don’t have access to the server where you ran them</li>
</ul>



<div id="app-screenshot-block_87edd7fee58be4f5945c209538ea64e8"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/11/Reporting.png?fit=1020%2C577&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/11/Reporting.png?fit=480%2C271&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/11/Reporting.png?fit=768%2C434&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/11/Reporting.png?fit=1020%2C577&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="577"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://scale.neptune.ai/o/examples/org/LLM-Pretraining/reports/9e6a2cad-77e7-42df-9d64-28f07d37e908"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				All metadata in a single place with an experiment tracker (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p>Additionally, you can sleep peacefully knowing that all the ideas you tried are safely stored, and you can always go back to them later.&nbsp;</p>


    <a
        href="/customers/waabi"
        id="cta-box-related-link-block_705c6929cc04256f0343ca347fce3e2c"
        class="block-cta-box-related-link  l-margin__top--0 l-margin__bottom--0"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
        <div class="block-cta-box-related-link__image-wrapper">
            <figure class="c-image__wrapper">

                
                <img
                    src="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/03/Feature-Image-Case-study-Waabi.jpg?fit=200%2C105&amp;ssl=1"
                    loading="lazy"
                    decoding="async"
                    width="200"
                    height="105"
                    class="c-image"
                    alt="">
            </figure>
        </div>

    
    <div class="block-cta-box-related-link__description-wrapper">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--resource.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related case study                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-experiment-tracking-for-systems-powering-self-driving-vehicles">                Experiment Tracking for Systems Powering Self-Driving Vehicles            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-compare-ml-experiments-analyze-results-debug-model-training-with-little-extra-work">Compare ML experiments, analyze results, debug model training with little extra work</h3>



<p><strong>Easily compare experiments, analyze results, and debug model training</strong></p>



<p>Whether you are debugging training runs, looking for improvement ideas, or auditing your current best models, comparing experiments is important.</p>



<p>But when you don’t have any experiment tracking system in place,</p>



<ul class="wp-block-list">
<li>the way you log things can change,&nbsp;</li>



<li>you may forget to log something important,</li>



<li>and you’re likely to lose some information accidentally.&nbsp;</li>
</ul>



<p>In those situations, something as simple as comparing and analyzing experiments can get difficult or even impossible.</p>



<p>With an experiment tracking system, your experiments are stored in a single place, and you consistently follow the same protocol for logging them. Experiment analyses and comparisons can go as deep as you like, and you can focus on improving your models instead of worrying about data storage.</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        Tracking and comparing different approaches has noticeably boosted our productivity, allowing us to focus more on the experiments [and] develop new, good practices within our team…
                    <cite class="c-cite">

                <span class="c-cite__name">Tomasz Grygiel</span>

                                    <span class="c-cite__company">Data Scientist at idenTT</span>
                
            </cite>
            </div>

    
</blockquote>



<p>Proper experiment tracking makes it easy to:</p>



<ul class="wp-block-list">
<li>Compare parameters and metrics between experiments</li>



<li>Overlay learning curves of different training runs</li>



<li>Group and compare experiments based on data versions or parameter values</li>



<li>Compare confusion matrices, ROC curves, and other performance charts</li>



<li>Compare the best/worst predictions on test or validation sets</li>



<li>View code diffs (and/or notebook diffs) for model, feature engineering, and training code</li>



<li>Look at hardware consumption during training runs for various models</li>



<li>Look at prediction explanations like feature importance, <a href="/blog/shap-values" target="_blank" rel="noreferrer noopener">SHAP</a>, or LIME</li>



<li>Compare rich-format artifacts like video or audio</li>



<li>… and compare anything else you logged</li>
</ul>



<div id="app-screenshot-block_3d004f46acf44492d511480f42152a22"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Comparison-features-for-ML-experiment-tracking.png?fit=1020%2C537&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Comparison-features-for-ML-experiment-tracking.png?fit=480%2C253&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Comparison-features-for-ML-experiment-tracking.png?fit=768%2C405&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Comparison-features-for-ML-experiment-tracking.png?fit=1020%2C537&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="537"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/onboarding-project/runs/compare?viewId=98f66b32-2279-4b73-8210-863021c440ac&#038;detailsTab=charts&#038;shortId=IMG-157&#038;dash=charts&#038;type=run&#038;compare=IwVhBoCZwFmKIE4g"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Comparison features for ML experiment tracking (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p></p>



<p>Modern experiment tracking tools will give you many, if not all, of those <a href="/product/compare-experiments" target="_blank" rel="noreferrer noopener">comparison features</a> (almost) for free. Some tools even go as far as to automatically find suitable experiments to compare to and identify for you which parameters have the biggest impact on model performance.</p>



<p>When you have all the pieces in one place, you can gain new insights and ideas just by looking at all the metadata you logged. That is especially true when you are not working alone.&nbsp;</p>



<p>Speaking of which…</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-improve-collaboration-see-what-everyone-is-doing-share-ml-experiment-results-easily-and-access-experiment-data-programmatically">Improve collaboration: see what everyone is doing, share ML experiment results easily, and access experiment data programmatically&nbsp;&nbsp;&nbsp;</h3>



<p>When you are part of a team, and many people are running experiments, having one source of truth for your entire team is really important.</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        [An experiment tracking system] makes it easy to share results with my teammates. I’m sending them a link and telling what to look at, or I’m building a view on the experiments dashboard. I don’t need to generate it by myself, and everyone in my team has access to it.
                    <cite class="c-cite">

                <span class="c-cite__name">Maciej Bartczak</span>

                                    <span class="c-cite__company">Resarch Lead at Banacha Street</span>
                
            </cite>
            </div>

    
</blockquote>


    <a
        href="/blog/best-software-for-collaborating-on-machine-learning-projects"
        id="cta-box-related-link-block_18008c5d2d41c4c21592e42375a4c185"
        class="block-cta-box-related-link  l-margin__top--0 l-margin__bottom--large"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-the-best-software-for-collaborating-on-machine-learning-projects">                The Best Software for Collaborating on Machine Learning Projects            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<p>Experiment tracking lets you organize and compare not only your past experiments but also see what everyone else was trying and how that worked out.&nbsp;</p>



<div id="app-screenshot-block_c1069aedff57af67c5b2bcf4cd510d89"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Collaboration-features-for-ML-experiment-tracking.png?fit=1020%2C516&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Collaboration-features-for-ML-experiment-tracking.png?fit=480%2C243&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Collaboration-features-for-ML-experiment-tracking.png?fit=768%2C388&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Collaboration-features-for-ML-experiment-tracking.png?fit=1020%2C516&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="516"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/onboarding-project/runs/table?viewId=98f66b32-2279-4b73-8210-863021c440ac&#038;product_tour_id=444083"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Collaboration features for ML experiment tracking (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p>Sharing results becomes easier, too.&nbsp;</p>



<p>Modern experiment tracking tools let you share your work by sending a link to a particular experiment or dashboard view. You don’t have to send screenshots or “have a quick meeting” to explain what is going on in your experiment. It saves a ton of time and energy.</p>



<p>For example, here is a link to an <a href="https://scale.neptune.ai/o/neptune/org/LLM-training-example/reports/9d5c5ea2-2b22-4422-b82b-f9f9886f733f" target="_blank" rel="noreferrer noopener nofollow">experiment dashboard</a> I created months ago. Pretty easy, right?</p>



<p>Apart from sharing things you see in a web UI, most <strong>experiment tracking setups let you access experiment metadata programmatically.</strong> This comes in handy when your experiments and models go from experimentation to production. For example, you can connect your experiment tracking tool to a CI/CD framework like GitHub Actions and integrate ML experimentation into your teams’ workflow. A visual comparison between the models on branches `main` and `develop` (and a way to explore details) adds another sanity check before you update your production model.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-see-your-ml-runs-live-manage-ml-experiments-from-anywhere-at-any-time"><strong>See your ML runs live: manage ML experiments from anywhere at any time</strong></h3>



<p>When you are training a model on your local computer, you can see what is going on whenever you like. But if your experiment is <strong>running on a remote server</strong> at work, university, or in the cloud,<strong> it may not be as easy to see</strong> what the learning curve looks like or discover that the training job crashed.</p>



<p>Experiment tracking systems solve this problem. While it’s a big security no-no to allow remote access to all of your data and servers,<strong> </strong>letting people see only <em>their</em> experiment’s metadata is usually fine.</p>



<p>When you can easily compare the currently running experiment to previous runs, you can decide whether it makes sense to continue. Why waste those precious GPU hours on something that is not converging? You will also quickly notice if your cloud training job has crashed, and you can close it (or fix the bug and re-run).</p>



<p>Speaking of GPUs and failed jobs, <strong>Some experiment tracking tools <a href="/product/monitor-training">monitor training</a> and log hardware consumption</strong>, helping you see whether you are using your resources efficiently.</p>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<div id="app-screenshot-block_7c0234c23ba8845abb7166ae0b5f0c8c"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=1020%2C521&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=480%2C245&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=768%2C392&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Real-time-monitoring-feature-for-ML-experiment-tracking.png?fit=1020%2C521&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="521"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/onboarding-project/runs/details?viewId=98f66b32-2279-4b73-8210-863021c440ac&#038;detailsTab=monitoring&#038;shortId=IMG-155&#038;type=run"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Real-time monitoring feature for ML experiment tracking (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p>For example, looking at GPU consumption over time can help you identify if your data loaders are not working correctly or that your multi-GPU setup is actually using just one core (which happened to me more times than I’d like to admit).</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        Without information I have in [Neptune’s] monitoring section I wouldn’t know that my experiments are running 10 times slower than they could.
                    <cite class="c-cite">

                <span class="c-cite__name">Michał Kardas</span>

                                    <span class="c-cite__company">ML Researcher at TensorCell</span>
                
            </cite>
            </div>

    
</blockquote>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-ml-experiment-tracking-best-practices"><strong>ML experiment tracking best practices</strong></h2>



<p>So far, we’ve covered what machine learning experiment tracking is and why it matters.</p>



<p>Now it’s time to get into details.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-what-you-should-keep-track-of-in-any-ml-experiment"><strong>What you should keep track of in any ML experiment:</strong></h3>



<p>As I mentioned initially, what information you may want to track ultimately depends on the project&#8217;s characteristics.</p>



<p>But there are some things that you should keep track of regardless of the project you are working on. Those are:</p>



<ul class="wp-block-list">
<li><strong>Code</strong>: Preprocessing, training and evaluation scripts, notebooks for feature engineering, and other utilities. And, of course, all the code needed to run (and re-run) the experiment.</li>



<li><strong>Environment</strong>: The easiest way to keep track of the environment is to save the environment configuration files like `Dockerfile` (Docker), `requirements.txt` (pip), `pyproject.toml` (e.g., hatch and poetry),&nbsp; or `conda.yml` (conda). You can also save built Docker images on Docker Hub or your own container repository, but I find saving configuration files easier.</li>



<li><strong>Data</strong>: Saving data versions (as a hash or locations of immutable data resources) makes it easy to see what your model was trained on. You can also use modern data versioning tools like DVC (and save the .dvc files to your experiment tracking tool).</li>



<li><strong>Parameters</strong>: Saving your experiment run’s configuration is crucial. Be especially careful when you pass parameters via the command line (e.g., through <em>argparse</em>, <em>click</em>, or <em>hydra</em>), as this is a place where you can easily forget to track important information (I have some horror stories to share). You may want to take a look at this article about various approaches to <a href="/blog/how-to-manage-track-visualize-hyperparameters" target="_blank" rel="noreferrer noopener">tracking hyperparameters</a>.&nbsp;</li>



<li><strong>Metrics</strong>: Logging evaluation metrics on train, validation, and test sets for every run is pretty obvious. But different frameworks do it differently, so you may want to check out this in-depth article on <a href="/blog/how-to-track-machine-learning-model-metrics" target="_blank" rel="noreferrer noopener">tracking ML model metrics</a>.</li>
</ul>



<p>Keeping track of those things will let you reproduce experiments, do basic debugging, and understand what happened at a high level.</p>



<p>That said, you can always <strong>log more things to gain even more insights.</strong> As long as you keep the data you track in a nice structure, it doesn’t hurt to collect information, even if you don’t know if it might be relevant later. After all, most metadata is just numbers and strings that don’t take up much space.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-what-else-you-could-keep-track-of"><strong>What else you could keep track of&nbsp;</strong></h3>



<p>Let’s look at some additional things you may want to keep track of when working on a specific type of project.</p>



<p>Below are some of my recommendations for various ML project types.&nbsp;</p>



<p><strong>Machine Learning</strong></p>



<ul class="wp-block-list">
<li>Model weights</li>



<li>Evaluation charts (ROC curves, Confusion matrix)</li>



<li>Prediction distributions</li>
</ul>



<div id="app-screenshot-block_795bdf2aafe8c1a0969983c5c9866920"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/08/Logging-different-model-metadata-for-experiment-tracking-example-in-neptune-e1722519946105.png?fit=1020%2C527&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/08/Logging-different-model-metadata-for-experiment-tracking-example-in-neptune-e1722519946105.png?fit=480%2C248&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/08/Logging-different-model-metadata-for-experiment-tracking-example-in-neptune-e1722519946105.png?fit=768%2C397&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/08/Logging-different-model-metadata-for-experiment-tracking-example-in-neptune-e1722519946105.png?fit=1020%2C527&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="527"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Logging different model metadata for experiment tracking (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p><strong>Deep Learning</strong></p>



<ul class="wp-block-list">
<li>Model checkpoints (both during and after training)</li>



<li>Gradient norms (to control for <a href="/blog/understanding-gradient-clipping-and-how-it-can-fix-exploding-gradients-problem" target="_blank" rel="noreferrer noopener">vanishing or exploding gradient problems</a>)&nbsp;</li>



<li>Best/worst predictions on the validation and test set after training</li>



<li>Hardware resources: handy for debugging data loaders and multi-GPU setups</li>
</ul>



<p><strong>Computer Vision</strong></p>



<ul class="wp-block-list">
<li>Model predictions after every epoch (labels, overlayed masks or bounding boxes)</li>
</ul>



<p><strong>Natural Language Processing and Large Language Models</strong></p>



<ul class="wp-block-list">
<li>Inference time</li>



<li>Prompts (in the case of generative LLMs)</li>



<li>Specific evaluation metrics (e.g., <a href="https://en.wikipedia.org/wiki/ROUGE_(metric)" target="_blank" rel="noreferrer noopener nofollow">ROUGE</a> for text summarization or <a href="https://en.wikipedia.org/wiki/BLEU" target="_blank" rel="noreferrer noopener nofollow">BLEU</a> for translation between languages)</li>



<li>Embedding size and dimensions, type of tokenizer, and number of attention heads (when training transformer models from scratch)</li>



<li>Feature importance, attention-based, or example-based explanations (see <a href="https://arxiv.org/pdf/2309.01029.pdf" target="_blank" rel="noreferrer noopener nofollow">this overview</a> for specific algorithms and more ideas)</li>
</ul>



<p><strong>Structured Data</strong></p>



<ul class="wp-block-list">
<li>Input data snapshot ( `<a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.head.html" target="_blank" rel="noreferrer noopener nofollow">.head()</a>` on DataFrames if you are using pandas)</li>



<li>Feature importance (e.g., permutation importance)</li>



<li>Prediction explanations like SHAP or partial dependence plots (they are all available in DALEX)</li>
</ul>



<p><strong>Reinforcement Learning</strong></p>



<ul class="wp-block-list">
<li>Episode return and episode length</li>



<li>Total environment steps, wall time, steps per second</li>



<li>Value and police function losses</li>



<li>Aggregate statistics over multiple environments and/or runs</li>
</ul>



<p></p>


    <a
        href="/blog/reinforcement-learning-agents-training-debug"
        id="cta-box-related-link-block_b8dcdf7a1dc908732ffe74bd1d3471ed"
        class="block-cta-box-related-link  l-margin__top--standard l-margin__bottom--standard"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-how-to-make-sense-of-the-reinforcement-learning-agents">                How to Make Sense of the Reinforcement Learning Agents            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<p><strong>Hyperparameter optimization:</strong></p>



<ul class="wp-block-list">
<li>Run score: the metric you are optimizing after every iteration</li>



<li>Run parameters: parameter configuration tried at each iteration</li>



<li>Best parameters: best parameters so far and overall best parameters after all runs have concluded</li>



<li>Parameter comparison charts: there are various visualizations that you may want to log during or after training, like parallel coordinates plot or slice plot (they are all available in Optuna, by the way)</li>
</ul>



<div id="app-screenshot-block_a1acefe9f740a4df7379fc0e72f5247c"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Hyperparameter-optimization-features-for-experiment-tracking.png?fit=1020%2C524&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Hyperparameter-optimization-features-for-experiment-tracking.png?fit=480%2C247&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Hyperparameter-optimization-features-for-experiment-tracking.png?fit=768%2C395&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Hyperparameter-optimization-features-for-experiment-tracking.png?fit=1020%2C524&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="524"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/onboarding-project/runs/compare?viewId=98f66b32-2279-4b73-8210-863021c440ac&#038;detailsTab=metadata&#038;shortId=IMG-155&#038;dash=parallel-coordinates-plot&#038;compare=IwFgHANAzBIc8ICYCs8BsiDs8dIlkA"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Hyperparameter optimization features for experiment tracking (example in neptune.ai)			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-how-to-set-up-machine-learning-experiment-tracking"><strong>How to set up machine learning experiment tracking</strong></h2>



<p>OK, those are nice guidelines, but how do you actually implement experiment tracking in your machine learning project?</p>



<p>There are (at least) a few options. The most popular being:</p>



<ul class="wp-block-list">
<li>Spreadsheets and naming conventions</li>



<li>Versioning everything in a Git repository</li>



<li>Using modern experiment tracking tools</li>
</ul>



<p>Let’s talk about those now.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-you-can-use-spreadsheets-and-naming-conventions-but-please-dont"><strong>You can use spreadsheets and naming conventions (but please don’t)</strong></h3>



<p>A <strong>common approach to experiment tracking is to create one giant spreadsheet</strong> where you put all of the information you can (metrics, parameters, etc.) and a directory structure where things are named in a certain way. Those names usually end up being really long and intricate, like <em>‘model_v1_lr01_ batchsize64_ no_preprocessing_ result_accuracy082.h5’</em>.</p>



<p>Whenever you run an experiment, you look at the results and copy them to the spreadsheet.</p>



<p>What is wrong with that?</p>



<p>To be honest, in some situations, it can be just enough to solve your experiment tracking needs. It may not be the best solution, but it is quick and straightforward.</p>



<p><em>… things can fall apart really quickly</em></p>



<p>But things can fall apart really quickly. There are (at least) a few major reasons why tracking experiments in spreadsheets doesn’t work for most people:</p>



<ul class="wp-block-list">
<li>You have to <strong>remember to track</strong> them. Things get messy if something doesn’t happen automatically, especially with more people involved.</li>



<li>You have to ensure that you or your team <strong>will not accidentally overwrite things</strong> in the spreadsheet. Spreadsheets are not easy to version, so if this happens, you are in trouble.&nbsp;</li>



<li>You have to <strong>remember to use the naming conventions</strong>. If someone on your team messes this up, tracking down the experiment artifacts (model weights, performance charts) for the experiments is painful.</li>



<li>You have to <strong>independently back up your artifact directories</strong> and keep them in sync with the spreadsheet. Even if you set up an automatic workflow that gets triggered regularly, there will inevitably come a time when it breaks.</li>



<li>When your <strong>spreadsheet grows, it becomes less and less usable</strong>. Searching for things and comparing hundreds of experiments in a spreadsheet (especially if you have multiple people who want to use it simultaneously) is not a great experience.</li>
</ul>


    <a
        href="/blog/switching-from-spreadsheets-to-neptune-ai"
        id="cta-box-related-link-block_010e4efd89d51f743f378d4e37fa3709"
        class="block-cta-box-related-link  l-margin__top--0 l-margin__bottom--0"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
        <div class="block-cta-box-related-link__image-wrapper">
            <figure class="c-image__wrapper">

                
                <img
                    src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/07/blog_feature_image_040962_5_3_11_3.jpg?fit=200%2C105&amp;ssl=1"
                    loading="lazy"
                    decoding="async"
                    width="200"
                    height="105"
                    class="c-image"
                    alt="">
            </figure>
        </div>

    
    <div class="block-cta-box-related-link__description-wrapper">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-switching-from-spreadsheets-to-an-experiment-tracker">                Switching from Spreadsheets to an Experiment Tracker             </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                 </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-you-can-version-ml-experiment-metadata-files-on-github">You can version ML experiment metadata files on GitHub</h3>



<p>Another option is to version all of your experiment metadata in a GitHub repository.&nbsp;</p>



<p>When running your experiment, you can commit metrics, parameters, charts, and whatever you want to keep track of to a repository. You can set up <a href="https://githooks.com/" target="_blank" rel="noreferrer noopener nofollow">post-commit hooks</a> that automatically create or update files (configs, charts, etc.) automatically after your experiment finishes.</p>



<p>It can work in some setups, but:</p>



<ul class="wp-block-list">
<li><strong>Git wasn’t built for comparing machine learning artifacts and experiment metadata. </strong>It’s built for versioning and storing text files. Neither binary artifacts like image files nor structured, relational data are handled well.</li>



<li><strong>You cannot compare more than two experiments at a time</strong>. Like most version control systems for code, Git was designed for comparing two commits. If you want to compare metrics and learning curves of multiple experiments, you are out of luck.</li>



<li><strong>Organizing many experiments is difficult</strong> (if not outright impossible). You can have branches where you try out new ideas or a separate branch for each experiment. But the more experiments you run, the less usable it becomes. (And you’ll have to make sure everyone follows whatever branching convention you come up with.)</li>



<li><strong>You will not be able to monitor your experiments live</strong>. You can only save information after your experiment finishes.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-maybe-you-could-build-your-own-ml-experiment-tracker">Maybe you could build your own ML experiment tracker?</h3>



<p>If a spreadsheet relies too much on discipline and will quickly grow to an unmanageable size, and a Git repository is just not the right kind of data store, how about spinning up a database and writing a slim Python client?</p>



<p>It’s certainly not the worst idea, and many experiment-tracking and machine-learning management solutions – <a href="https://deepsense.ai/neptune-machine-learning-platform-post/" target="_blank" rel="noreferrer noopener nofollow">including our own</a> – started this way.</p>



<p>At least, you’ll need the following components:</p>



<ul class="wp-block-list">
<li><strong>A database to keep your metadata.</strong> A natural choice is a schema-free database like MongoDB or CouchDB that allows you to store and query arbitrary JSON documents.</li>



<li><strong>A place to store artifacts like model snapshots or plots.</strong> A blob storage bucket, a network drive, or a good old FTP server will probably do.</li>



<li><strong>A client to integrate into your experiment code.</strong> A few lines of Python that push metadata and files to your central repositories will suffice initially.</li>
</ul>



<p>But then things start to get complicated rather quickly. How will you retrieve and analyze the metadata? Is your team content with pulling data into notebooks and generating their plots themselves? Or do you need to set up a dashboard and develop a web frontend? What about live tracking?</p>



<p>I certainly share the enthusiasm for conceptualizing and creating ML experiment-tracking tools – after all, it’s my job these days – but I doubt the effort is worth it for most teams. As we’ll see in the next sections, plenty of excellent tools are available.</p>


    <a
        href="/blog/build-experiment-tracking-tool"
        id="cta-box-related-link-block_c71444865493f3907ee9c146557bfe19"
        class="block-cta-box-related-link  l-margin__top--0 l-margin__bottom--0"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
        <div class="block-cta-box-related-link__image-wrapper">
            <figure class="c-image__wrapper">

                
                <img
                    src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/07/blog_feature_image_036456_4_3_6_0.jpg?fit=200%2C105&amp;ssl=1"
                    loading="lazy"
                    decoding="async"
                    width="200"
                    height="105"
                    class="c-image"
                    alt="">
            </figure>
        </div>

    
    <div class="block-cta-box-related-link__description-wrapper">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related post                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-how-to-build-an-experiment-tracking-tool-learnings-from-engineers-behind-neptune">                How to Build an Experiment Tracking Tool [Learnings From Engineers Behind Neptune]            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-you-can-use-a-modern-experiment-tracking-tool"><strong>You can use a modern experiment tracking tool</strong></h3>



<p>Instead of trying to adjust generic tools to work for machine learning experiments or developing your own platform, you could just use one of the solutions built specifically for tracking, organizing, and comparing experiments.&nbsp;</p>



<blockquote class="block-case-study-quote">

    <div class="block-case-study-quote__content">
        Within the first few tens of runs, I realized how complete the tracking was – not just one or two numbers, but also the exact state of the code, the best-quality model snapshot stored to the cloud, the ability to quickly add notes on a particular experiment. My old methods were such a mess by comparison. 
                    <cite class="c-cite">

                <span class="c-cite__name">Edward Dixon</span>

                                    <span class="c-cite__company">Data Scientist at intel</span>
                
            </cite>
            </div>

    
</blockquote>



<p>They have slightly different interfaces, but they usually work in a similar way:</p>



<p><strong>Step 1</strong></p>



<p>Connect to the tool by adding a snippet to your training code.</p>



<p>For example:</p>



<p></p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--0 l-margin__bottom--large block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> neptune

run = neptune.init_run() <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># initialize a new run</span></pre></code></pre>
</div>




<p><strong>Step 2</strong></p>



<p>Specify what you want to log (or use an ML framework integration that does it for you):</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--0 l-margin__bottom--large block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> neptune.types <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> File

run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"accuracy"</span>] = evaluate_accuracy(model, test_data)
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">for</span> prediction_image <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">in</span> worst_predictions:
    run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"worst predictions"</span>]].append(
       File.as_image(prediction_image)
    )</pre></code></pre>
</div>




<p><strong>Step 3</strong></p>



<p>Run your experiment as you normally would:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--0 l-margin__bottom--large block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">python train.py
</pre></code></pre>
</div>




<p>And that’s it!</p>



<p>Your experiment is logged to a central experiment database and displayed in a dashboard, where you can search, compare, and drill down to whatever information you need.</p>



<div id="app-screenshot-block_7351c902f230f63702965d5e39a4373d"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Machine-learning-experiment-tracking-with-neptune.png?fit=1020%2C516&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Machine-learning-experiment-tracking-with-neptune.png?fit=480%2C243&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Machine-learning-experiment-tracking-with-neptune.png?fit=768%2C389&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2024/07/Machine-learning-experiment-tracking-with-neptune.png?fit=1020%2C516&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="516"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/onboarding-project/runs/table?viewId=98f66b32-2279-4b73-8210-863021c440ac&#038;dash=parallel-coordinates-plot&#038;query=(%60training%2Fmetrics%2Fbest_validation_dice_coefficient%60%3Afloat%20%3E%3D%200.8)%20AND%20((%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22training%22)%20OR%20(%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22finetuning%22)%20OR%20(%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22best%22))&#038;sortBy=%5B%22training%2Fmetrics%2Fbest_validation_dice_coefficient%22%5D&#038;sortFieldType=%5B%22float%22%5D&#038;sortFieldAggregationMode=%5B%22auto%22%5D&#038;sortDirection=%5B%22descending%22%5D&#038;suggestionsEnabled=false&#038;lbViewUnpacked=true"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Machine learning experiment tracking with neptune.ai			</figcaption>
			
</div>



<div id="separator-block_79e7161c6a136f52ccb11a073ebbdd0c"
         class="block-separator block-separator--15">
</div>



<p>Today, there are several tools for machine learning experiment tracking optimized for different contexts, and I would strongly recommend using one. They are <strong>designed to treat machine learning experiments</strong> as first-class citizens, and they will always</p>



<ul class="wp-block-list">
<li>be<strong> easier to use for a machine learning person</strong> than general tools</li>



<li>have <strong>built-in features to analyze and compare experiments</strong></li>
</ul>



<p>One important decision to make is whether you want to use a software-as-a-service offering or host an open source tool yourself.</p>



<ul class="wp-block-list">
<li>Most open source experiment tracking tools provide the interfaces you need to <strong>create plugins and integrations. </strong>This might be an essential selection criterion if you’re working with somewhat esoteric data storage systems or compute infrastructure.&nbsp;</li>



<li><strong>You’re not tied to any vendor or cloud provider. </strong>If you want, you can take your machine learning experiment tracker and move to a different cloud provider. There is no need to try to migrate data between incompatible platforms. If an open source project is no longer maintained, you can keep developing it – or at least keep the lights on as long as you need to prepare your migration on your own schedule.</li>



<li><strong>Your data and artifacts never have to leave your premises.</strong> For the vast majority of businesses and even government agencies, the protections that contracts and legal agreements provide are sufficient to allow them to store their data on third-party clouds. But if your data must under no circumstances leave your building, self-hosting is your only option.</li>
</ul>



<p>But let’s face it: Everyone who’s ever self-hosted tools knows how long it takes to get things working right and has experienced how simple day-to-day system maintenance became a bottomless time sink. And let’s not forget the hassle of keeping up with breaking changes and security fixes.</p>



<p>It’s no surprise that many data science teams are looking for a fully managed experiment tracking platform. Key benefits of paying someone else to run an experiment tracker on your behalf include:</p>



<ul class="wp-block-list">
<li><strong>You don’t need to worry about infrastructure, scaling, and updates.</strong> Someone else takes care of the burdensome maintenance work, and you’ll never lose valuable data because your server runs out of storage space mid-experiment.</li>



<li><strong>Vendors have a lot more experience with machine learning experiment tracking than any single machine learning team could ever accumulate.</strong> Here at Neptune, we’ve worked with <a href="/customers" target="_blank" rel="noreferrer noopener">hundreds of customers</a>, constantly learning about new edge cases and continuously discovering new ways to optimize experiment tracking.</li>



<li><strong>Data scientists can focus on creating and optimizing machine learning models.</strong> When you adopt a managed experiment tracking platform, you’re not only leaving the software engineering and maintenance to the specialists but also getting access to dedicated support.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-next-steps">Next steps</h3>



<p>Machine learning experiment tracking is, first and foremost, a practice, not just a tool or a logging method. It will take some time to really understand and implement:</p>



<ul class="wp-block-list">
<li><strong>what to keep track of</strong> for your project,</li>



<li><strong>how to use that information</strong> to improve future experiments,</li>



<li>how to <strong>improve your teams’ unique workflow</strong> with it,</li>



<li>and <strong>when to even use</strong> experiment tracking.</li>
</ul>



<p>Hopefully, after reading this article, you have a good idea of how to start tracking and how it can improve your (or your teams’) machine learning workflow.&nbsp;</p>



<section
	id="i-box-block_34cc841299dc5a4709c8181acd7d0b4c"
	class="block-i-box  l-margin__top--large l-margin__bottom--large">

			<header class="c-header">
			<img
				src="https://neptune.ai/wp-content/themes/neptune/img/image-ratio-holder.svg"
				data-src="https://neptune.ai/wp-content/themes/neptune/img/blocks/i-box/header-icon.svg"
				width="24"
				height="24"
				class="c-header__icon lazyload"
				alt="">

			
            <h2 class="c-header__text animation " style='max-width: 100%;'   >
                 <strong>Editor&#8217;s note</strong>
            </h2>		</header>
	
	<div class="block-i-box__inner">
		

<p>Do you feel like experimenting with neptune.ai?</p>



<ul
    id="arrow-list-block_341b8f8a4c074101c0f8ce44dcaec7bc"
    class="block-arrow-list block-list-item--font-size-regular">
    

<li class="block-list-item ">
    <img loading="lazy" decoding="async"
        src="https://neptune.ai/wp-content/themes/neptune/img/image-ratio-holder.svg"
        data-src="https://neptune.ai/wp-content/themes/neptune/img/blocks/list-item/arrow.svg"
        width="10"
        height="10"
        class="block-list-item__arrow lazyload"
        alt="">

    

<p>Request a <a href="/free-trial" target="_blank" rel="noreferrer noopener">free trial</a></p>


</li>



<li class="block-list-item ">
    <img loading="lazy" decoding="async"
        src="https://neptune.ai/wp-content/themes/neptune/img/image-ratio-holder.svg"
        data-src="https://neptune.ai/wp-content/themes/neptune/img/blocks/list-item/arrow.svg"
        width="10"
        height="10"
        class="block-list-item__arrow lazyload"
        alt="">

    

<p>Play with a <a href="https://scale.neptune.ai/o/examples/org/LLM-Pretraining/reports/9e6a2cad-77e7-42df-9d64-28f07d37e908" target="_blank" rel="noreferrer noopener nofollow">live project</a></p>


</li>



<li class="block-list-item ">
    <img loading="lazy" decoding="async"
        src="https://neptune.ai/wp-content/themes/neptune/img/image-ratio-holder.svg"
        data-src="https://neptune.ai/wp-content/themes/neptune/img/blocks/list-item/arrow.svg"
        width="10"
        height="10"
        class="block-list-item__arrow lazyload"
        alt="">

    

<p><a previewlistener="true" href="https://docs.neptune.ai/" target="_blank" rel="noreferrer noopener">See the docs</a>&nbsp;or watch a short&nbsp;<a href="/walkthrough" target="_blank" rel="noreferrer noopener">product demo (2 min)</a></p>


</li>


</ul>


	</div>

</section>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3045</post-id>	</item>
		<item>
		<title>Best Tools to Manage Machine Learning Projects</title>
		<link>https://neptune.ai/blog/best-tools-to-manage-machine-learning-projects</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 10:13:49 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/best-tools-to-manage-machine-learning-projects/</guid>

					<description><![CDATA[Managing Machine Learning Projects is not exactly a piece of cake but every data scientist already knows that. It touches many things: So how to make sure everything runs smoothly? How to administer all the parts to create a coherent workflow?&#160; &#8230;by using the right tool that will help you manage machine learning projects. But&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Managing Machine Learning Projects is not exactly a piece of cake but every data scientist already knows that.</p>



<p>It touches many things:</p>



<ul class="wp-block-list">
<li>Data exploration,&nbsp;</li>



<li>Data preparation and setting up machine learning pipelines&nbsp;</li>



<li>Experimentation and model tuning&nbsp;</li>



<li>Data, pipeline, and model versioning</li>



<li>Managing infrastructure and run orchestration</li>



<li>Model serving and productionalization</li>



<li>Model maintenance (retraining and monitoring models in production)</li>



<li>Effective collaboration between different roles (data scientist, data engineer, <a href="https://youteam.io/blog/software-developer-vs-engineer/" target="_blank" rel="noreferrer noopener">software developer</a>, DevOps, team manager, business stakeholder)</li>
</ul>



<p>So how to make sure everything runs smoothly? How to administer all the parts to create a coherent workflow?&nbsp;</p>



<p>&#8230;by using the right tool that will help you manage machine learning projects. But you already know that 😉 There are many apps that can help you improve parts of or even an entire workflow. Sure, it&#8217;s really cool to do everything yourself, but why not use tools if they can save you lots of trouble</p>



<p>Let’s get right to it and see what’s on the plate! Below is a list of tools that touch various points listed above. Some are more end-to-end some are focused on a particular stage of the machine learning lifecycle but all of them will help you manage your machine learning projects. Check out our list and choose the one(s) you like most.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-1-neptune">1. <a href="https://neptune.ai/" target="_blank" rel="noreferrer noopener nofollow">Neptune</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Product_team-workspace.jpg?ssl=1" alt="Team workspace" class="wp-image-37685"/></figure>
</div>


<p>Neptune is a <strong>metadata store for MLOps built for research and production teams </strong>that run a lot of experiments. It is very flexible, works with many other frameworks, and thanks to its stable user interface, it enables great scalability (to millions of runs).</p>



<p>It’s a robust software that can store, retrieve, and analyze a large amount of data. Neptune has all the tools for efficient team collaboration and project supervision.</p>



<p><strong>Neptune – summary:</strong></p>



<ul class="wp-block-list">
<li>Provides user and organization management with a different organization, projects, and user roles</li>



<li>Fast and beautiful UI with a lot of capabilities to organize runs in groups, save custom dashboard views and share them with the team</li>



<li>You can use a hosted app to avoid all the hassle with maintaining yet another tool (or have it deployed on your on-prem infrastructure)</li>



<li>Your team can track experiments which are executed in scripts (Python, R, other), notebooks (local, Google Colab, AWS SageMaker) and do that on any infrastructure (cloud, laptop, cluster)</li>



<li>Extensive experiment tracking and visualization capabilities (resource consumption, scrolling through lists of images)</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-2-kubeflow">2. <a href="https://www.kubeflow.org/" target="_blank" rel="noreferrer noopener nofollow">Kubeflow</a></h2>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/9p0JzjqUwDsCUshqRtr4mj--D9TGBt7s4S4HRsr1pKyUyhM1CCs_npQZz9BvDSC7sYntCqG7TVAbccFwtS6bgyZB4So0QTzUgddTCBAwCSpQvtBZcsCEMwCj1Pb9dMe3fBFgGqTz" alt="" style="width:624px;height:292px" width="624" height="292"/></figure>
</div>


<p>Kubeflow is the ML toolkit for Kubernetes. It helps in maintaining machine learning systems by packaging and managing docker containers. It facilitates the scaling of machine learning models by making run orchestration and deployments of machine learning workflows easier.</p>



<p>It’s an open-source project that contains a curated set of compatible tools and frameworks specific for various ML tasks.</p>



<p><strong>Kubeflow – summary:</strong></p>



<ul class="wp-block-list">
<li>A user interface (UI) for managing and tracking experiments, jobs, and runs</li>



<li>Notebooks for interacting with the system using the SDK</li>



<li>Re-use components and pipelines to quickly create end-to-end solutions without having to rebuild each time</li>



<li>Kubeflow Pipelines is available as a core component of Kubeflow or as a standalone installation</li>
</ul>



<section id="blog-intext-cta-block_da8709c5b9177bc4eef27e3dea13767c" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-see-also">See also</h3>
    
            <p>   <a href="/vs/kubeflow" target="_blank" rel="noopener">Comparison Between Kubeflow and Neptune</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-3-dvc">3. <a href="http://dvc.org/" target="_blank" rel="noreferrer noopener nofollow">DVC</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh4.googleusercontent.com/38cQ-W80cCTC24aMItFkactqBKaLp63Atj4gupY3PMVHBqPcAV5Ju_KnMSGnHbjyMs0wNlLQB3D5q6277v8dHH8yZrhjBZDJoVLFMV78Pmsg6-KvPYdbReqLjT-FN-CtQ1tZlJkp" alt=""/></figure>
</div>


<p>DVC is an open-source <strong>version control system for machine learning projects</strong>. It’s a tool that lets you define your pipeline regardless of the language you use.</p>



<p>When you find a problem in a previous version of your ML model, DVC saves your time by leveraging code data, and pipeline versioning, to give you reproducibility. You can also train your model and share it with your teammates via DVC pipelines.</p>



<p>DVC can cope with versioning and organization of big amounts of data and store them in a well-organized, accessible way. It focuses on data and pipeline versioning and management but also has some (limited) experiment tracking functionalities.</p>



<p><strong>DVC – summary:</strong></p>



<ul class="wp-block-list">
<li>Possibility to use different types of storage— it’s storage agnostic</li>



<li>Full code and data provenance help to track the complete evolution of every ML model</li>



<li>Reproducibility by consistently maintaining a combination of input data, configuration, and the code that was initially used to run an experiment</li>



<li>Tracking metrics</li>



<li>A built-in way to connect ML steps into a DAG and run the full pipeline end-to-end</li>
</ul>



<section id="blog-intext-cta-block_490e0ed983bd0f1ef186006f6a74de0f" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-learn-more">Learn more</h3>
    
            <p>   <a href="/vs/dvc" target="_blank" rel="noopener">Comparison Between DVC and Neptune</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-4-polyaxon">4. <a href="http://polyaxon.com/" target="_blank" rel="noreferrer noopener nofollow">Polyaxon</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh4.googleusercontent.com/NDxT6qbiM1tRseCENNEqfkE0Cgsx5b5MkXe9zasmmiPwx6wzt1HC7QUfdSFce166PiiXXa4H05zjPf7o8B2OONKYq-e_TjKyOiZVAtCv8FNh8t_4bJZrB_zlM3BSndTepE0hz6oG" alt=""/></figure>
</div>


<p>Polyaxon is a platform for reproducing and managing the whole life cycle of machine learning projects as well as deep learning applications.</p>



<p>The tool can be deployed into any data center, cloud provider, and can be hosted and managed by Polyaxon. It supports all the major deep learning frameworks, e.g., Torch, Tensorflow, MXNet.</p>



<p><strong>Polyaxon – summary:</strong></p>



<ul class="wp-block-list">
<li>Supports the entire lifecycle including run orchestration but can do way more than that</li>



<li>Has an open-source version that you can use right away but also provides options for enterprise</li>



<li>Very well documented platform, with technical reference docs, getting started guides, learning resources, guides, tutorials, changelogs, and more</li>



<li>Allows to monitor, track, and analyze every single optimization experiment with the experiment insights dashboard</li>
</ul>



<section id="blog-intext-cta-block_95e9c689f1e38bbf557522f869b3e01f" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-related">Related</h3>
    
            <p>   <a href="/vs/polyaxon" target="_blank" rel="noopener">Comparison Between Polyaxon and Neptune</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-5-github">5. <a href="https://github.com/" target="_blank" rel="noreferrer noopener nofollow">GitHub</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh5.googleusercontent.com/8ZJsX0fK1DFDAt-zvgVbYW0A-antQS73mka500C3LgOBN87PtaCkLjcs7M1iYiKbVHFk80YoNIs9ViUsg6v1wfGhehfYA21WELow8f7GPtmrvF0iCPr3GrEJ_J25PDvRoEugSaCP" alt=""/></figure>
</div>


<p>GitHub is the most popular platform built for developers. It’s used by millions of teams around the globe as it allows for easy and painless collaboration. With GitHub, you can<strong> host and review code, manage projects, and build software</strong>.</p>



<p>It’s a great platform for teams collaborating on machine learning projects who want to simplify workflow and share ideas conveniently. GitHub lets teams manage ideas, coordinate work, and stay aligned with the entire team to seamlessly collaborate on machine learning projects.</p>



<p><strong>GitHub – summary:</strong></p>



<ul class="wp-block-list">
<li>Build, test, deploy, and run CI/CD the way you want in the same place you manage code</li>



<li>Use Actions to automatically publish new package versions to GitHub Packages. Install packages and images hosted on GitHub Packages or your preferred registry of record in your CI/CD workflows</li>



<li>The software lets you secure your work with vulnerability alerts so you can remediate risks and learn how CVEs affect you</li>



<li>The build-in review tools make it easy and convenient to review code – a team can propose changes, compare versions, and give feedback</li>



<li>GitHub easily integrates with other tools for smooth work, or you can create your own tools with GitHubGraphQL API</li>



<li>GitHub is a platform where all the documentation is easily accessible, and all the features make it a unified system for flexibly developing software.</li>
</ul>



<section id="blog-intext-cta-block_2a1b7462c9232b6b6517a0cf6bb70e05" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-you-may-also-like">You may also like</h3>
    
            <p>  <a href="/blog/build-mlops-pipelines-with-github-actions-guide" target="_blank" rel="noopener">How to Build MLOps Pipelines with GitHub Actions [Step by Step Guide]</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-6-jira-and-confluence">6. <a href="https://www.atlassian.com/software/confluence/jira-integration" target="_blank" rel="noreferrer noopener nofollow">Jira and Confluence</a></h2>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh3.googleusercontent.com/zRVZB-ejkKIsXOD744VGjWr50NYI9sQSw5bXaDsODbDnpgYyEgAq7kRK3ENSXv7FPIakTy4tzijosLJnMyrNla44iDAOatovqgO8EvuHl5qzBvunRh3nl6GiX6XiwRihgNV9dvU-" alt="" style="width:800px;height:694px" width="800" height="694"/></figure>
</div>


<p>Jira is a great software for agile teams as it allows for fully-encompassed project management. It’s an issue and project tracking tool so teams can plan, track, and release their product or software as a perfectly developed ‘organism’. With Confluence, teams have even more flexibility to manage ML projects.</p>



<p>The two tools allow for flexible workflow automation. You can freely manage a project by assigning certain tasks to people, bugs to programmers, create milestones, or plan to carry certain tasks within a&nbsp; specific timeframe.</p>



<p>Products and apps built on top of the Jira combined with Confluence help teams <strong>plan, assign, track, report, and manage work</strong>. All updates from Jira will automatically appear in Confluence since the two tools are linked together.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-7-notion">7. <a href="https://www.notion.so/" target="_blank" rel="noreferrer noopener nofollow">Notion</a></h2>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh3.googleusercontent.com/6c1DaorpUgbaozRbvbm5nsSMvENKOpt92B5ykGM5gGCEXL0gEVjVqNWyMaQg421GIQITbHYxa7gfxct-oZzDxkpcVgRTIYlqKGzmqWA5k9RX5wpJtGeAH8xrPpXtCefrW_w0FIGk" alt="" style="width:800px;height:499px" width="800" height="499"/></figure>
</div>


<p>Notion is a collaboration tool that lets you write, plan, and organize teamwork.</p>



<p>It has four modules, each with different functionalities:</p>



<ol class="wp-block-list">
<li><strong>Notes, Docs</strong> – text editor which serves as a space for files, notes of different formats; you can add images, bookmarks, videos, code, and many more</li>



<li><strong>Knowledge Base</strong> – in this module, teams can store knowledge about projects, tools, best practices, and other aspects that are necessary for developing machine learning projects</li>



<li><strong>Tasks, Projects</strong> – tasks and projects can be organized in a Kanban board, calendar, and list views</li>



<li><strong>Databases</strong> – this module can effectively replace spreadsheets and keep records of important data and unique workflows in a convenient way</li>
</ol>



<p>Additionally, every team member can use Notion for personal use to keep a record of work-related activities and information, for example, weekly agenda, goal, task list, or personal notes.</p>



<p>Other smallish features include #markdown. /Slash commands, drag-and-drop feature, comments and discussions, and integrations with 50+ popular apps such as Google Docs, Github Gist, CodePen, and more.</p>



<p>All modules create a coherent system that serves as a unified hub for work management and project planning.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-8-wandb-weights-biases">8. <a href="https://www.wandb.com/" target="_blank" rel="noreferrer noopener nofollow">WandB (Weights &amp; Biases)</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh4.googleusercontent.com/crJ797FeaTkLkdJzFT1LIoVNr8noSarLn4yhcrIguk33-LqcvidJU5gez7RngGQjwqAkwlXZFQlm5eHe2orUaEqbrxRUpj5Z3XWtO8Lh6JBbJY7M2_MPwcM2aOhACJBKTUcO0UKy" alt=""/></figure>
</div>


<p>Weights &amp; Biases a.k.a. WandB is focused on deep learning. Users track experiments to the application with Python library, and – as a team – can see each other’s experiments.</p>



<p>WandB is a hosted service allowing you to backup all experiments in a single place and work on a project with your team. WandB lets you log many data types and analyze them in a nice UI.</p>



<p><strong>Weights &amp; Biases – summary:</strong></p>



<ul class="wp-block-list">
<li>Experiments tracking: extensive logging options</li>



<li>Multiple features for sharing work in a team</li>



<li>Several open source integrations with other tools available</li>



<li>SaaS/Local instance available</li>



<li>WandB logs the model graph, so you can inspect it later</li>
</ul>



<section id="blog-intext-cta-block_26f89a75840f0323880eaad00d5d41f0" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-see-also">See also</h3>
    
            <p>  <a href="/vs/wandb" target="_blank" rel="noopener">Comparison Between WandB and Neptune</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-9-streamlit">9. <a href="https://www.streamlit.io/" target="_blank" rel="noreferrer noopener nofollow">Streamlit</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh3.googleusercontent.com/Z_4KEGkFJXImt4XY9mze50iEIQ4Rys6Jz8ibzrhQSOVoCKDeHEvlTRKAyoSJuHFDQnwNcnUI4oUG_9HcCzpnbSZ5Dsredi_fAkfSqPraBefMlH1fKL_m-WtADa_Uuu_9JLt18x0T" alt=""/></figure>
</div>


<p>This one is an open-source Python library that enables you to build fancy custom web-apps for machine learning and data science. It is perfect when you need to build a quick proof-of-concept app and show it to someone, especially when that someone is a bit less technical.&nbsp;</p>



<p>In Streamlit you can automatically update your app every time you change its source code. This allows you to work in a fast interactive loop:&nbsp;</p>



<ul class="wp-block-list">
<li>You type code, save it, try it out live</li>



<li>Then type some more code, save it, try it out again</li>



<li>And so on.</li>
</ul>



<p>Streamlit’s architecture allows you to write apps the same way you write plain Python scripts.</p>



<p>You can easily share your machine learning models with other people and effectively work in a team.</p>



<p>See how we built a streamlit app for exploring results of image segmentation and object detection models trained on COCO: <a href="/blog/data-exploration-for-image-segmentation-and-object-detection" target="_blank" rel="noreferrer noopener">How to Do Data Exploration for Image Segmentation and Object Detection (Things I Had to Learn the Hard Way)</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-10-amazon-sagemaker">10. <a href="https://aws.amazon.com/sagemaker/" target="_blank" rel="noreferrer noopener nofollow">Amazon SageMaker</a></h2>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh5.googleusercontent.com/yosTTRE97CU3UIIAiTbdVJBorfbnhhlZuZGZRT0CliwSxiqAxG3QWE2zfMSAQ-WImVPzCnh7abfqc5FygLSJPijfB_iG1BMV0vsBBliq0biVSR_vJby8_9t0BL_FxEQAVUqkf_G0" alt=""/></figure>
</div>


<p>Amazon SageMaker is a platform that enables data scientists to <strong>build, train, and deploy machine learning models</strong>. It has all the integrated tools for the entire machine learning workflow providing all of the components used for machine learning in a single toolset.</p>



<p>SageMaker is a tool suitable for organizing, training, deployment, and managing machine learning models. It has a single, web-based visual interface to perform all ML development steps – notebooks, experiment management, automatic model creation, debugging, and model drift detection</p>



<p><strong>Amazon SageMaker – summary:</strong></p>



<ul class="wp-block-list">
<li>Autopilot automatically inspects raw data, applies feature processors, picks the best set of algorithms, trains and tunes multiple models, tracks their performance, and then ranks the models based on performance – it helps to deploy the best performing model</li>



<li>SageMaker Ground Truth helps you build and manage highly accurate training datasets quickly</li>



<li>SageMaker Experiments helps to organize and track iterations of machine learning models&nbsp; by automatically capturing the input parameters, configurations, and results, and storing them as ‘experiments’</li>



<li>SageMaker Debugger automatically captures real-time metrics during training (such as training and validation, confusion, matrices, and learning gradients) to help improve model accuracy. The Debugger can also generate warnings and remediation advice when common training problems are detected</li>



<li>SageMaker Model Monitor allows developers to detect and troubleshoot concept drift. It automatically detects concept drift in deployed models and gives detailed alerts that help identify the source of the problem</li>



<li></li>
</ul>



<section id="blog-intext-cta-block_5ee03c8f9cece261bdfb5ff6fb9cd73d" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-read-more">Read more</h3>
    
            <p>  <a href="https://docs.neptune.ai/integrations-and-supported-tools/ide-and-notebooks/amazon-sagemaker" target="_blank" rel="noopener">Neptune + Amazon SageMaker Integration</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-11-domino-data-lab">11. <a href="https://www.dominodatalab.com/" target="_blank" rel="noreferrer noopener nofollow">Domino Data Lab</a></h2>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/4Qv_B0h34J28suR219rK7X3O7OzM0SqHo2zYikQcqyDd5TapjjtQqvc9in943EN3sKH2ZCHNf6ppcY4oh0Vu-CfJP7FrW4tScQI1h2N8tehTodbLbTDZhJXZab-y-BJ-1rZtARVw" alt="" style="width:800px;height:475px" width="800" height="475"/></figure>
</div>


<p>Domino Data Lab is a great tool to manage machine learning projects for teams who need a centralized hub to store all their data.</p>



<p>Domino is a data science platform that enables <strong>fast, reproducible, and collaborative work on data products</strong> like models, dashboards, and data pipelines. You can run regular jobs, launch interactive notebook sessions, view vital metrics, share work with the teammates, and communicate with them directly in the Domino web app.</p>



<p>It’s an advanced management platform for all kinds of machine learning projects, especially helpful for growing organizations that need to share work, and review code fast and effectively.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-12-cortex">12. <a href="https://www.cortex.dev/" target="_blank" rel="noreferrer noopener nofollow">Cortex</a></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/cortex.png?resize=768%2C560&#038;ssl=1" alt="Cortex" class="wp-image-20004" style="width:768px;height:560px" width="768" height="560"/></figure>
</div>


<p>Cortex is an open-source alternative to serving models with SageMaker or building your own <a href="https://neptune.ai/blog/best-ml-model-deployment-tools" target="_blank" rel="noreferrer noopener">model deployment platforms</a> on top of AWS services like Elastic Kubernetes Service (EKS), Lambda, or Fargate and open source projects like Docker, Kubernetes, TensorFlow Serving, and TorchServe.</p>



<p>It’s a multi framework tool that lets you deploy all types of models.</p>



<p><strong>Cortex – summary:</strong></p>



<ul class="wp-block-list">
<li>Automatically scale APIs to handle production workloads</li>



<li>Run inference on any AWS instance type</li>



<li>Deploy multiple models in a single API and update deployed APIs without downtime</li>



<li>Monitor API performance and prediction results</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p>There are many great tools to choose from. Make sure to look for integrations and features that suit your needs to get the most out of your work.</p>



<p>Enjoy managing your machine learning projects!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2283</post-id>	</item>
		<item>
		<title>A Complete Guide to Monitoring ML Experiments Live in Neptune</title>
		<link>https://neptune.ai/blog/monitoring-machine-learning-experiments-guide</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 10:08:38 +0000</pubDate>
				<category><![CDATA[ML Model Development]]></category>
		<guid isPermaLink="false">https://neptune.test/monitoring-machine-learning-experiments-guide/</guid>

					<description><![CDATA[Training machine learning or deep learning models can take a really long time. If you are like me, you like to know what&#8217;s happening during that time and you&#8217;re probably interested in: Neptune lets you do all that, and in this post, I will show you how to make it happen. Step by step. Check&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Training machine learning or deep learning models can take a really long time. </p>



<p>If you are like me, you like to know what&#8217;s happening during that time and you&#8217;re probably interested in:</p>



<ul class="wp-block-list">
<li>monitoring your training and validation losses, </li>



<li>looking at the GPU consumption,</li>



<li>seeing image predictions after every other epoch </li>



<li>and a bunch of other things.</li>
</ul>



<p>Neptune lets you do all that, and in this post, I will show you how to make it happen. Step by step.</p>



<p>Check out this <a href="https://app.neptune.ai/shared/step-by-step-monitoring-experiments-live/e/STEP-22/charts" target="_blank" rel="noreferrer noopener nofollow">example run</a> to see what this can look like in the Neptune app.&nbsp;</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section id="note-block_3976d5ec3a7919ad21027241c6a1e484"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-note__header">
            Note:        </h3>
    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>If you want to try Neptune monitoring without registration check this <a href="https://docs.neptune.ai/usage/quickstart/" target="_blank" rel="noopener">Quickstart tutorial</a>.</p>
                                    </div>

            </div>
            </div>


</section>
</div></div>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-set-up-your-neptune-account">Set up your Neptune account</h2>



<p>Setting up a project and connecting your scripts to Neptune is super easy, but you still need to do it 🙂</p>



<p>Let’s take care of that quickly.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-1-create-a-project">1. <strong>Create a project</strong></h3>



<p>Let’s <a href="https://docs.neptune.ai/setup/creating_project/" target="_blank" rel="noreferrer noopener">create a project</a> first.&nbsp;</p>



<p>To do that:</p>



<ul class="wp-block-list">
<li>go to the <a href="https://app.neptune.ai/" target="_blank" rel="noreferrer noopener nofollow">Neptune app</a>,&nbsp;</li>



<li>click on <code>New project</code> button on the left,</li>



<li>give it a name,</li>



<li>decide whether you want it to be public or private,</li>



<li>done.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-2-get-your-api-token">2. <strong>Get your API token</strong></h3>



<p>You will need a <a href="https://docs.neptune.ai/setup/setting_api_token/" target="_blank" rel="noreferrer noopener">Neptune API token</a> (your personal key) to connect the scripts you run with Neptune.</p>



<p>To do that:</p>



<ul class="wp-block-list">
<li>click on your user logo on the right&nbsp;</li>



<li>click on <code>Get Your API token</code>&nbsp;</li>



<li>copy your API token&nbsp;</li>



<li>paste it to the environment variable, config file, or directly to your script if you feel really adventurous 🙂</li>
</ul>



<p>A token is like a password, so I try to keep it safe.&nbsp;</p>



<p>Since I am a Linux guy I put it in my environment file <code>~/.bashrc</code>. If you are using a different system, check the <a href="https://docs.neptune.ai/setup/setting_api_token/" target="_blank" rel="noreferrer noopener">API token section in the documentation</a>. </p>



<p>With that, whenever you run my training scripts, Neptune will know who you are and log things appropriately.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-3-install-client-library">3. <strong>Install client library&nbsp;</strong></h3>



<p>To work with Neptune, you need a client library that deals with logging everything you care about.&nbsp;</p>



<p>Since I am using Python, I will use the Python client, but you can <a href="https://docs.neptune.ai/integrations/r/" target="_blank" rel="noreferrer noopener">use Neptune with R language</a> as well.&nbsp;</p>



<p>You can install it with pip:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">pip install neptune
</pre>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-4-initialize-neptune">4. Initialize Neptune</h3>



<p>Now that you have everything set up, you can start monitoring things!</p>



<p>First, connect your script to Neptune by adding the following towards the top of your script:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>import neptune

run = neptune.init_run(
    project="workspace-name/project-name",
    api_token="Your Neptune API token",
)</code></pre>
</div>




<h3 class="wp-block-heading" class="wp-block-heading" id="h-5-create-a-run">5. Create a run</h3>



<p>​​Use the <a href="https://docs.neptune.ai/api/neptune/#init_run" target="_blank" rel="noreferrer noopener">init_run()</a> method to create a new run. We started a run when we executed neptune.init_run() above.</p>



<p>The started run then tracks some system metrics in the background, plus whatever metadata you log in your code. By default, Neptune periodically synchronizes the data with the servers in the background. Check <a href="https://docs.neptune.ai/logging/automatic/" target="_blank" rel="noreferrer noopener">what exactly Neptune logs automatically</a>. </p>



<p>The connection to Neptune remains open until the run is stopped or the script finishes executing. You can explicitly stop the run by calling run.stop().</p>



<h4 class="wp-block-heading">But what’s a run?</h4>



<p>A ‘<a href="https://docs.neptune.ai/api/neptune/#init_run" target="_blank" rel="noreferrer noopener">run</a>’ is a namespace inside a project where you can log model-building metadata.&nbsp;</p>



<p>Typically, you create a run every time you execute a script that does model training, re-training, or inference. Runs can be viewed as dictionary-like structures that you define in your code.</p>



<p>They have:</p>



<ul class="wp-block-list">
<li><em>Fields</em>, where you can log your ML metadata</li>



<li><em>Namespaces</em>, which organize your fields</li>
</ul>



<p>Whatever hierarchical metadata structure you create, Neptune reflects them in the UI.</p>



<p>To create a structured namespace, use a forward slash / like this:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>run["metrics/f1_score"] = 0.67
run["metrics/test/roc"] = 0.82
</code></pre>
</div>




<p>The snippet above:</p>



<ul class="wp-block-list">
<li>Creates two namespaces: metrics and metrics/test.</li>



<li>Assigns values to fields f1_score and roc.</li>
</ul>



<p>&nbsp;&nbsp;For the full list of run arguments, you can refer to <a href="https://docs.neptune.ai/api/neptune/#init_run" target="_blank" rel="noreferrer noopener">Neptune&#8217;s API documentation.</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-monitoring-experiments-in-neptune-methods">Monitoring experiments in Neptune: methods</h2>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-logging-basic-stuff">Logging basic stuff</h3>



<p>In a nutshell, logging into Neptune is as simple as going:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>run["WHAT_YOU_WANT_TO_LOG"] = ITS_VALUE</code></pre>
</div>




<p>Let’s take a look at some different ways in which you can log important things to Neptune.</p>



<p>You can log:</p>



<ul class="wp-block-list">
<li>Metrics and losses -&gt; <code>run["accuracy"]=0.90</code></li>



<li>Images and charts -&gt; <code>run["images"].upload("bboxes.png")</code>;</li>



<li>Artifacts like model files -&gt; <code>run["model_checkpoints"].upload("my_model.pt")</code></li>



<li>And many other things.</li>
</ul>



<p>Sometimes you may just want to log something once before or after the training is done.</p>



<p>In that case, just do:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>params = {
    "activation": "sigmoid",
    "dropout": 0.25,
    "learning_rate": 0.1,
    "n_epochs": 100,
}
</code></pre>
</div>




<p>In other scenarios, there is a training loop inside which you might want to log a series of values. For this, we use the .append() function.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>for epoch in range(params["n_epochs"]):
    # this would normally be your training loop
    run["train/loss"].append(0.99*epoch)
    run["train/acc"].append(1.01*epoch)
    run["eval/loss"].append(0.98*epoch)
    run["eval/acc"].append(1.02*epoch)
</code></pre>
</div>




<p>This creates the namespaces &#8220;train&#8221; and &#8220;eval&#8221;, each with a&nbsp;<code>loss</code>&nbsp;and&nbsp;<code>acc</code>&nbsp;field.</p>



<p>You can see these visualized as charts in the app later.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-logging-with-integrations">Logging with integrations</h3>



<p>To make logging easier, we created integrations for most of the Python ML libraries, including PyTorch, TensorFlow, Keras, scikit-learn, and more. You can <a href="https://docs.neptune.ai/integrations/" target="_blank" rel="noreferrer noopener">see all the Neptune integrations here</a>. These integrations give you out-of-the-box utilities that log most of the ML metadata you would normally log in those ML libraries. Let&#8217;s check a few examples. </p>



<h4 class="wp-block-heading">Monitor TensorFlow/Keras models </h4>



<p>The Neptune–Keras integration logs the following metadata automatically:</p>



<ul class="wp-block-list">
<li>Model summary</li>



<li>Parameters of the optimizer used for training the model</li>



<li>Parameters passed to model.fit during the training</li>



<li>Current learning rate at every epoch</li>



<li>Hardware consumption and stdout/stderr output during training</li>



<li>Training code and Git information</li>
</ul>



<p>To log metadata as you train your model with Keras, you can use NeptuneCallback in the following manner.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>from neptune.integrations.tensorflow_keras import NeptuneCallback

run = neptune.init_run()
neptune_cbk = NeptuneCallback(run=run)

model.fit(
    x_train,
    y_train,
    epochs=5,
    batch_size=64,
    callbacks=[neptune_cbk],
)</code></pre>
</div>




<p>Your training metrics will be logged to Neptune automatically:</p>



<div id="app-screenshot-block_7f6f9ab93332a904847df518f34a2f4a"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/04/keras-integration-dashboard-2.jpg?fit=1020%2C532&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/04/keras-integration-dashboard-2.jpg?fit=480%2C251&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/04/keras-integration-dashboard-2.jpg?fit=768%2C401&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/04/keras-integration-dashboard-2.jpg?fit=1020%2C532&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="532"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://app.neptune.ai/o/showcase/org/tf-keras-integration/runs/details?viewId=standard-view&#038;detailsTab=dashboard&#038;dashboardId=Overview-9b8fb3c0-be33-4c15-bef2-2bcdd2c642eb&#038;shortId=TFK-9&#038;type=run&#038;distraction-free=1"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
														class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in the app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Keras training dashboard in the Neptune web app			</figcaption>
			
</div>



<div id="separator-block_352103a3d66c911f3d13d1b04c1988b4"
         class="block-separator block-separator--20">
</div>



<p>Check the docs to learn more about what you can do with <a href="https://docs.neptune.ai/integrations/keras/" target="_blank" rel="noreferrer noopener">Neptune-Keras integration</a>.</p>



<h4 class="wp-block-heading">Monitor time series Prophet models</h4>



<p>Prophet is a popular time-series forecasting library. With the Neptune–Prophet integration, you can keep track of parameters, forecast data frames, residual diagnostic charts, cross-validation folds, and other metadata while training models with Prophet.</p>



<p>Here’s an example of how to log relevant metadata regarding your Prophet model all at once.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>import pandas as pd
from prophet import Prophet
import neptune
import neptune.integrations.prophet as npt_utils

run = neptune.init_run()

dataset = pd.read_csv(
    "https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv"
)
model = Prophet()
model.fit(dataset)

run["prophet_summary"] = npt_utils.create_summary(
    model, dataset, log_interactive=True
)
</code></pre>
</div>




<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1395" height="957" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=1395%2C957&#038;ssl=1" alt="Monitor experiments Neptune Prophet" class="wp-image-13631" style="width:810px;height:555px" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?w=1395&amp;ssl=1 1395w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=768%2C527&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=200%2C137&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=220%2C151&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=120%2C82&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=160%2C110&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=300%2C206&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=480%2C329&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Prophet.jpg?resize=1020%2C700&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/common/fbprophet-integration/e/FBPROP-249/dashboard/Diagnostic-charts-5855c208-c4b8-4171-b065-d0e8802b1b60" target="_blank" rel="noreferrer noopener nofollow">See this example in the Neptune app</a></figcaption></figure>



<p>Check the docs to know more about <a href="https://docs.neptune.ai/integrations/prophet/" target="_blank" rel="noreferrer noopener nofollow">Neptune-Prophet integration</a>.</p>



<h4 class="wp-block-heading">Monitor Optuna hyperparameter optimization</h4>



<p>Parameter tuning framework <a href="https://docs.neptune.ai/integrations/optuna/" target="_blank" rel="noreferrer noopener">Optuna, also has a callback system that you can plug Neptune</a> in nicely. All the results are logged and updated after every parameter search iteration.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>import neptune.integrations.optuna as optuna_utils

run = neptune.init_run()
neptune_callback = optuna_utils.NeptuneCallback(run)

study = optuna.create_study(direction="maximize")
study.optimize(objective, n_trials=20, callbacks=[neptune_callback])
</code></pre>
</div>




<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1611" height="702" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=1611%2C702&#038;ssl=1" alt="Monitor experiments Neptune Optuna" class="wp-image-13634" style="width:810px;height:352px" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?w=1611&amp;ssl=1 1611w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=768%2C335&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=200%2C87&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=1536%2C669&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=220%2C96&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=120%2C52&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=160%2C70&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=300%2C131&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=480%2C209&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-experiments-Neptune-Optuna.jpg?resize=1020%2C444&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/common/optuna-integration/e/NEP1-370/dashboard/Vizualizations-5ea92658-6a56-4656-b225-e81c6fbfc8ab" target="_blank" rel="noreferrer noopener nofollow">See this example in the Neptune app</a></figcaption></figure>



<p>Visit the docs to learn more about the <a href="https://docs.neptune.ai/integrations/optuna/" target="_blank" rel="noreferrer noopener">Neptune-Optuna integration</a>.</p>



<p>Most ML frameworks have some callback system in place. They vary slightly, but the idea is the same. You can take a look at the entire list <a href="https://docs.neptune.ai/integrations/">of tools that Neptune supports</a>. In case you are unable to find your framework in this list, you can always resort to the good old way of logging via Neptune Client, as discussed above already.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-what-can-you-monitor-in-neptune">What can you monitor in Neptune?</h2>



<p>There are a ton of different things that you can log to Neptune and monitor live.&nbsp;</p>



<p>Metrics and learning curves, hardware consumption, model predictions, ROC curves, console logs, and more can be logged for every experiment and explored live.</p>



<p>Let’s go over a few of them, one by one. </p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-monitor-ml-metrics-and-losses"><strong>Monitor ML metrics and losses</strong></h3>



<p>You can log scores and metrics as single values, with = assignment, or as series of values, with the log() method.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code># Log scores (single value)
run["score"] = 0.97
run["test/acc"] = 0.97

# Log metrics (series of values)
for epoch in range(100):
    # your training loop
    acc = ...
    loss = ...
    metric = ...

    run["train/accuracy"].append(acc)
    run["train/loss"].append(loss)
    run["metric"].append(metric)
</code></pre>
</div>




<figure class="wp-block-image size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1920" height="970" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=1920%2C970&#038;ssl=1" alt="Monitor metrics Neptune" class="wp-image-13650" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?w=1920&amp;ssl=1 1920w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=768%2C388&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=200%2C101&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=1536%2C776&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=220%2C111&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=120%2C61&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=160%2C81&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=300%2C152&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=480%2C243&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-metrics-Neptune.jpg?resize=1020%2C515&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/common/colab-test-run/e/COL-217/charts" target="_blank" rel="noreferrer noopener nofollow">See this example in the Neptune app</a></figcaption></figure>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-monitor-hardware-resources-and-console-logs"><strong>Monitor hardware resources</strong> and console logs</h3>



<p>These are actually logged to Neptune automatically:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>run = neptune.init_run(capture_hardware_metrics=True)</code></pre>
</div>




<p>Just go to the <code>Monitoring</code> section to see it:</p>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1915" height="961" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=1915%2C961&#038;ssl=1" alt="Monitor hardware metrics Neptune" class="wp-image-13647" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?w=1915&amp;ssl=1 1915w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=768%2C385&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=200%2C100&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=1536%2C771&amp;ssl=1 1536w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=220%2C110&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=120%2C60&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=160%2C80&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=300%2C151&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=480%2C241&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Monitor-hardware-metrics-Neptune.jpg?resize=1020%2C512&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/common/showroom/e/SHOW-14/monitoring" target="_blank" rel="noreferrer noopener nofollow">See this example in the app</a></figcaption></figure>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-monitor-image-predictions"><strong>Monitor image predictions</strong></h3>



<p>You can log either a single image or a series of images (example below).</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>from neptune.types import File

for name in misclassified_images_names:
    y_pred = ...
    y_true = ...
    run["misclassified_imgs"].append(File("misclassified_image.png"))
</code></pre>
</div>




<p>They will be visible in the image gallery in the app:</p>



<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1259" height="640" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=1259%2C640&#038;ssl=1" alt="Neptune example_gallery" class="wp-image-13645" style="width:810px;height:411px" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?w=1259&amp;ssl=1 1259w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=768%2C390&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=200%2C102&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=220%2C112&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=120%2C61&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=160%2C81&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=480%2C244&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-example_gallery.png?resize=1020%2C519&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/common/pytorch-lightning-integration/e/PTL-15/images" target="_blank" rel="noreferrer noopener nofollow">See this example in the app</a></figcaption></figure>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-monitor-file-updates"><strong>Monitor file updates</strong></h3>



<p>You can save model weights from any deep learning framework by using the&nbsp;<code>upload()</code>&nbsp;method. In the below example, they&#8217;re logged under a field called&nbsp;<code>my_model</code>&nbsp;in the namespace&nbsp;<code>model_checkpoints</code>.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code># Log PyTorch model weights
my_model = ...
torch.save(my_model, "my_model.pt")
run["model_checkpoints/my_model"].upload("model_checkpoints/my_model.pt")
</code></pre>
</div>




<p>Model checkpoints appear in the&nbsp;<strong>All metadata</strong>&nbsp;section.</p>



<figure class="wp-block-image size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="918" height="345" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=918%2C345&#038;ssl=1" alt="" class="wp-image-13644" style="width:810px;height:304px" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?w=918&amp;ssl=1 918w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=768%2C289&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=200%2C75&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=220%2C83&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=120%2C45&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=160%2C60&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=300%2C113&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2022/12/Neptune-run_view_model_checkpoints.png?resize=480%2C180&amp;ssl=1 480w" sizes="auto, (max-width: 918px) 100vw, 918px" /><figcaption class="wp-element-caption"><a href="https://app.neptune.ai/o/common/org/showroom/e/SHOW-14/all?path=model_checkpoints" target="_blank" rel="noreferrer noopener nofollow">See this example in the Neptune app</a></figcaption></figure>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-compare-running-experiments-with-previous-ones">Compare running experiments with previous ones</h2>



<p>The cool thing about monitoring ML experiments in Neptune is that you can compare running experiments with your previous ones.&nbsp;</p>



<p>It makes it easy to decide whether the model that you are training is showing promise of improvement. If it doesn’t you can even abort the experiment from the UI.</p>



<p>To do that:</p>



<ul class="wp-block-list">
<li>go to the experiment dashboard</li>



<li>select a few experiments</li>



<li>click compare to overlay learning curves and show diffs in parameters and metrics</li>



<li>click <a href="https://docs.neptune.ai/app/remote_stop_and_abort/" target="_blank" rel="noreferrer noopener">abort on the running ones</a> if you no longer see the point in training</li>
</ul>



<figure class="wp-block-video"><video height="980" style="aspect-ratio: 1848 / 980;" width="1848" controls src="https://neptune.ai/wp-content/uploads/2022/10/compare-learning-curves.mp4"></video></figure>



<p>Apart from comparing experiments using charts, you can also compare them in the side-by-side table format view or as parallel coordinates. And if you log any images, it&#8217;s also possible to compare them. See the <a href="https://docs.neptune.ai/app/comparison/" target="_blank" rel="noreferrer noopener">docs about comparison options</a>. </p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-share-running-experiments-with-others-with-a-link">Share running experiments with others with a link</h2>



<p>Finally, you can share your running experiments by copying the link to the experiment and sending it to someone.&nbsp;</p>



<p>Just like I am sharing this experiment with you here:</p>



<p><a href="https://ui.neptune.ai/o/shared/org/step-by-step-monitoring-experiments-live/e/STEP-22" target="_blank" rel="noreferrer noopener">https://ui.neptune.ai/o/shared/org/step-by-step-monitoring-experiments-live/e/STEP-22</a></p>



<p>The cool thing is you can send people directly to a part of your experiment that you want to show them, like code, hardware consumption charts, or learning curves. You can share the experiment comparisons with links as well.&nbsp;</p>



<figure class="wp-block-video"><video height="980" style="aspect-ratio: 1848 / 980;" width="1848" controls src="https://neptune.ai/wp-content/uploads/2022/10/share-persistent-link.mp4"></video></figure>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-final-thoughts">Final thoughts</h2>



<p>With all this information, you should be able to monitor every piece of the machine learning experiment that you care about.</p>



<p>For even more info, you can:</p>



<ul class="wp-block-list">
<li>See how the monitoring works in <a href="https://colab.research.google.com/github/neptune-ai/examples/blob/master/how-to-guides/monitor-ml-runs/notebooks/Monitor_ML_runs_live.ipynb" target="_blank" rel="noreferrer noopener nofollow">this google colab notebook</a> that comes with snippets for logging all sorts of things to Neptune</li>



<li>Check out this <a href="https://app.neptune.ai/o/common/org/quickstarts/e/QUI-28177/dashboard/quick-check-7b6057af-8003-4748-982e-34a7b83207ed" target="_blank" rel="noreferrer noopener">example run monitoring experiment</a> to see how this can look like&nbsp;</li>



<li><a href="https://docs.neptune.ai/logging/what_you_can_log/" target="_blank" rel="noreferrer noopener">Read the updated list of things that you can log&nbsp;</a></li>



<li><a href="https://docs.neptune.ai/integrations/" target="_blank" rel="noreferrer noopener">Check out the full list of our integrations with ML frameworks&nbsp;</a></li>



<li>Talk to us on Intercom (that blue thing in the corner).</li>
</ul>



<p>Happy experiment monitoring!</p>
]]></content:encoded>
					
		
		<enclosure url="https://neptune.ai/wp-content/uploads/2022/10/compare-learning-curves.mp4" length="165023" type="video/mp4" />
<enclosure url="https://neptune.ai/wp-content/uploads/2022/10/share-persistent-link.mp4" length="479312" type="video/mp4" />

		<post-id xmlns="com-wordpress:feed-additions:1">3632</post-id>	</item>
		<item>
		<title>Top Machine Learning Influencers &#8211; All the Names You Need to Know</title>
		<link>https://neptune.ai/blog/top-machine-learning-influencers</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 09:44:16 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://neptune.test/top-machine-learning-influencers/</guid>

					<description><![CDATA[Machine learning wouldn’t be possible without all the great minds. If it wasn’t for them, AI wouldn’t be so advanced and our lives would look completely different. Following the great minds of machine learning can help you discover new things and deepen your knowledge. It’s fascinating to learn from the best scientists. Among them, you&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Machine learning wouldn’t be possible without all the great minds. If it wasn’t for them, AI wouldn’t be so advanced and our lives would look completely different.</p>



<p>Following the great minds of machine learning can help you discover new things and deepen your knowledge. It’s fascinating to learn from the best scientists. Among them, you will find influencers, teachers, business leaders, and many more. Undeniably their expertise can help change the world and make it a better place.</p>



<p>On this list, you will find not only influencers but also renowned personalities from the world of Data Science. Take a look at all the names you should know as a machine learning researcher. Learn and get inspired to discover new things!</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-1-vladimir-vapnik">1. Vladimir Vapnik</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Vladimir-Vapnik.png?resize=216%2C219&#038;ssl=1" alt="Vladimir Vapnik" class="wp-image-16737" style="width:216px;height:219px" width="216" height="219"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Vladimir Naumovich Vapnik is one of the main developers of the Vapnik–Chervonenkis theory of statistical learning, and the co-inventor of the support-vector machine method, and support-vector clustering algorithm.</p>



<p>Professor Vapnik gained his Masters Degree in Mathematics in 1958 at Uzbek State University, Samarkand, USSR. From 1961 to 1990 he worked at the Institute of Control Sciences, Moscow, where he became Head of the Computer Science Research Department. He then joined AT&amp;T Bell Laboratories, Holmdel, NJ, having been appointed Professor of Computer Science and Statistics at Royal Holloway in 1995. Vladimir Vapnik is a renowned scientist in the field of machine learning.</p>
</div>
</div>



<p class="has-text-align-left"><a href="https://datascience.columbia.edu/vladimir-vapnik" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Profile on Columbia University website</span></a><span style="font-weight: 400;"> || </span><a href="https://en.wikipedia.org/wiki/Vladimir_Vapnik" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Wikipedia</span></a></p>



<p><span style="font-weight: 400;">⇒ Make sure to listen to </span><a href="https://www.youtube.com/watch?v=bQa7hpUpMzM&amp;fbclid=IwAR0GVZ-ufzuvaYq3kSVseQuL-R3QyKEn1KEzx0WhxLPoo2Rt0_bpJpfc9Zc" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Vladimir Vapnik on AI Podcast</span></a></p>



<p><span style="font-weight: 400;">⇒ Also, read about </span><a href="https://cml.rhul.ac.uk/people/chervonenkis/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Alexey Chervonenkis</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-2-andrej-karpathy">2. Andrej Karpathy</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>The Sr. Director of AI at Tesla, where he leads the team responsible for all neural networks on the Autopilot. Previously, he was a Research Scientist at OpenAI working on Deep Learning in Computer Vision, Generative Modeling and Reinforcement Learning. Andrej Karpathy received his PhD from Stanford, where he worked with Fei-Fei Li on Convolutional/Recurrent Neural Network architectures and their applications in Computer Vision, Natural Language Processing and their intersection.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Andrej-Karpathy.png?resize=221%2C221&#038;ssl=1" alt="Andrej Karpathy" class="wp-image-16721" style="width:221px;height:221px" width="221" height="221"/></figure>
</div></div>
</div>



<p class="has-text-align-left"><a href="https://cs.stanford.edu/people/karpathy/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Academic Website</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/andrej-karpathy-9a650716/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/karpathy" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://github.com/karpathy" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">GitHub</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-3-gregory-piatetsky-shapiro">3. Gregory Piatetsky-Shapiro</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Gregory-Piatetsky-Shapiro.png?ssl=1" alt="Gregory Piatetsky Shapiro" class="wp-image-16727"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Gregory Piatetsky-Shapiro, Ph.D., is the president of KDnuggets. He is a well-known expert in Business Analytics, Data Mining, and Data Science and a top influencer in the field. He was no. 1 on LinkedIn Top Voices in 2018 on Data Science and Analytics. Gregory is a co-founder of KDD (Knowledge Discovery and Data mining conferences) and co-founder and past chair of SIGKDD, a professional organization for Knowledge Discovery and Data Mining. Gregory has over 60 publications and edited several books and collections on data mining and knowledge discovery.</p>
</div>
</div>



<p><span style="font-weight: 400;">⇒ Check out </span><a href="https://www.kdnuggets.com/gpspubs/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Gregory Piatetsky-Shapiro Selected Publications on KDNuggets</span></a></p>



<p class="has-text-align-left"><a href="https://twitter.com/kdnuggets" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/gpiatetsky/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://www.kdnuggets.com/gps.html" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">KDNuggets</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-4-allie-k-miller">4. Allie K. Miller</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Allie Miller is the US Head of AI Business Development for Startups and Venture Capital at Amazon, advancing the greatest AI companies in the world.</p>



<p>Previously, Allie was the youngest-ever woman to build an artificial intelligence product at IBM—spearheading large-scale product development across computer vision, conversation, data, and regulation.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Allie-K-Miller.png?ssl=1" alt="Allie K Miller" class="wp-image-16720"/></figure>
</div></div>
</div>



<p>Outside of work, Allie is changing the game of AI. Allie has spoken about AI and field diversity around the world, addressed the European Commission, drafted foreign AI strategies, and created eight guidebooks to educate businesses on how to build successful AI projects.</p>



<p><a href="https://www.linkedin.com/in/alliekmiller/" rel="noreferrer noopener nofollow" target="_blank"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || <a href="https://twitter.com/alliekmiller?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" rel="noreferrer noopener nofollow" target="_blank">Twitter</a> || </span><a href="https://www.instagram.com/alliekmiller/?hl=en" rel="noreferrer noopener nofollow" target="_blank"><span style="font-weight: 400;">Instagram</span></a><span style="font-weight: 400;"> || </span><a href="https://www.alliekmiller.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-5-yann-lecun">5. Yann LeCun</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Yann-LeCun.png?ssl=1" alt="Yann LeCun" class="wp-image-16738"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Yann LeCun is VP &amp; Chief AI Scientist at Facebook and Silver Professor at NYU affiliated with the Courant Institute of Mathematical Sciences &amp; the Center for Data Science.&nbsp;</p>



<p>He was the founding Director of Facebook AI Research and of the NYU Center for Data Science. He received an Engineering Diploma from ESIEE (Paris) and a PhD from Sorbonne Université. After a postdoc in Toronto he joined AT&amp;T Bell Labs in 1988, and AT&amp;T Labs in 1996 as Head of Image Processing Research. He joined NYU as a professor in 2003 and Facebook in 2013.&nbsp;</p>
</div>
</div>



<p>His interests include AI machine learning, computer perception, robotics and computational neuroscience.&nbsp;</p>



<p>He is the recipient of the 2018 ACM Turing Award (with Geoffrey Hinton and Yoshua Bengio) for “conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing”, a member of the National Academy of Engineering and a Chevalier de la Légion d’Honneur.</p>



<p><span style="font-weight: 400;">⇒ To learn about Yann LeCun interesting work, listen to </span><a href="https://www.youtube.com/watch?v=SGSOCuByo24" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Yann LeCun on AI Podcast</span></a></p>



<p class="has-text-align-left"><a href="https://www.linkedin.com/in/yann-lecun-0b999/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/ylecun" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="http://yann.lecun.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a><span style="font-weight: 400;"> || <a href="https://www.quora.com/profile/Yann-LeCun" target="_blank" rel="noreferrer noopener nofollow">Quora</a></span></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-6-fei-fei-li">6. Fei-Fei Li</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>A computer scientist, non-profit executive, and writer. She is a professor at Stanford University and the co-director of Stanford’s Human-Centered AI Institute and the Stanford Vision and Learning Lab.&nbsp;</p>



<p>She served as the director of the Stanford Artificial Intelligence Laboratory (SAIL) from 2013 to 2018. In 2017, she co-founded AI4ALL, a nonprofit organization working to increase diversity and inclusion in the field of artificial intelligence.&nbsp;</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Fei-Fei-Li.png?ssl=1" alt="Fei-Fei Li" class="wp-image-16726"/></figure>
</div></div>
</div>



<p>Her research expertise includes artificial intelligence (AI), machine learning, deep learning, computer vision, and cognitive neuroscience.</p>



<p>She was the leading scientist and principal investigator of ImageNet.</p>



<p>She has been described as an “AI pioneer” and a “researcher bringing humanity to AI”.</p>



<p>Fei-Fei Li has been elected to the National Academy of Engineering which is among the highest professional distinctions for engineers.</p>



<p class="has-text-align-left"><a href="https://twitter.com/drfeifei" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/fei-fei-li-4541247/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://profiles.stanford.edu/fei-fei-li" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Academic Profile</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-7-jurgen-schmidhuber">7. Jürgen Schmidhuber</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Jurgen-Schmidhuber.png?ssl=1" alt="Jurgen Schmidhuber" class="wp-image-16728"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>A computer scientist most noted for his work in the field of artificial intelligence, deep learning and artificial neural networks. He is a co-director of the Dalle Molle Institute for Artificial Intelligence Research in Manno, in the district of Lugano, in Ticino in southern Switzerland.&nbsp;</p>



<p>He is sometimes called the “father of (modern) AI” or, one time, the “father of deep learning.”</p>



<p>Schmidhuber did his undergraduate studies at the Technische Universität München in Munich, Germany. He taught there from 2004 until 2009 when he became a professor of artificial intelligence at the Università della Svizzera Italiana in Lugano, Switzerland.</p>
</div>
</div>



<p><span style="font-weight: 400;">⇒ And </span><a href="https://www.youtube.com/watch?v=3FIo6evmweo" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Jürgen Schmidhuber</span></a></p>



<p class="has-text-align-left"><a href="https://www.linkedin.com/in/j%C3%BCrgen-schmidhuber-39226872/?originalSubdomain=ch" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/SchmidhuberAI" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="http://people.idsia.ch/~juergen/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-8-nick-bostrom">8. Nick Bostrom</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Nick Bostrom is a Swedish philosopher at the University of Oxford known for his work on existential risk, the anthropic principle, human enhancement ethics, superintelligence risks, and the reversal test.&nbsp;</p>



<p>In 2011, he founded the Oxford Martin Programme on the Impacts of Future Technology, and is the founding director of the Future of Humanity Institute at Oxford University. In 2009 and 2015, he was included in Foreign Policy’s Top 100 Global Thinkers list.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Nick-Bostrom.png?ssl=1" alt="Nick Bostrom" class="wp-image-16732"/></figure>
</div></div>
</div>



<p>Bostrom is the author of over 200 publications, and has written two books and co-edited two others. The two books he has authored are Anthropic Bias: Observation Selection Effects in Science and Philosophy (2002) and Superintelligence: Paths, Dangers, Strategies (2014). Superintelligence was a New York Times bestseller, was recommended by Elon Musk and Bill Gates among others, and helped to popularize the term “superintelligence“.</p>



<p class="has-text-align-left"><a href="https://www.nickbostrom.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a><span style="font-weight: 400;"> || </span><a href="https://en.wikipedia.org/wiki/Nick_Bostrom" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">More on Nick Bostrom on Wikipedia</span></a><span style="font-weight: 400;"> and </span><a href="https://www.ted.com/speakers/nick_bostrom" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">TED</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-9-angelica-lim">9. Angelica Lim</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Angelica-Lim.png?ssl=1" alt="Angelica Lim" class="wp-image-16723"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Dr. Angelica Lim received her Ph.D. and M.Sc. in Intelligence Science from Kyoto University, and B.Sc. in Computing Science with Minor in French from Simon Fraser University, Canada. A key member on the Pepper humanoid robot project with Softbank and Aldebaran Robotics, she has interned as a software engineer and researcher at Google Santa Monica, Honda Research Institute Japan, and I3S-CNRS, France.</p>
</div>
</div>



<p>She has worked on robots and artificial intelligence for over 10 years, and is currently interested in signal processing, machine learning and developmental robotics for intelligent systems, particularly in the field of emotions. She is one of four journalists for the IEEE Spectrum Automaton Robotics Blog, and was a speaker at TEDx Kyoto 2012 (“On Designing User-Friendly Robots”) and TEDx KualaLumpur 2014 (“Robots, Emotions and Empathy”).</p>



<p>She was a Guest Editor for the International Journal of Synthetic Emotions, and has received various awards including CITEC Award for Excellence in Doctoral HRI Research (2014), NTF Award for Entertainment Robots and Systems IROS (2010), and the Google Canada Anita Borg Scholarship (2008). She has been featured on the BBC, given talks at SXSW and TEDx, hosted a TV documentary on robotics, and was recently featured in Forbes 20 Leading Women in AI.</p>



<p class="has-text-align-left"><a href="https://twitter.com/petitegeek" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/angelicajeannelim/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="http://www.angelicalim.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-10-fabio-moioli">10. Fabio Moioli</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Fabio Moioli is Head Consulting &amp; Services at Microsoft. Faculty at Harvard, SingularityU, MIP – Artificial &amp; Human Intelligences – AI TEDx. Has 250.000+ followers on Linkedin &amp; Twitter, where he mainly addresses opportunities and challenges raised by Artificial Intelligence and exponential technologies, including societal and ethical perspectives.</p>



<p>Major areas of expertise include Artificial Intelligence, Digital Platforms, Transformation programs, Lean Operations, Product &amp; Services Innovation, and more.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Fabio-Moioli.png?ssl=1" alt="Fabio Moioli" class="wp-image-16725"/></figure>
</div></div>
</div>



<p class="has-text-align-left"><a href="https://www.linkedin.com/in/fabiomoioli/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/fabiomoioli" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.instagram.com/fabio.moioli/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Instagram</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-11-andrew-ng">11. Andrew Ng</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Andrew-Ng.png?ssl=1" alt="Andrew Ng" class="wp-image-16722"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>A businessman, computer scientist, investor, and writer. He is focusing on machine learning and AI. As a businessman and investor, Ng co-founded and led Google Brain and was a former Vice President and Chief Scientist at Baidu, building the company’s Artificial Intelligence Group into a team of several thousand people.</p>



<p>Ng is an adjunct professor at Stanford University (formerly associate professor and Director of its AI Lab). Also a pioneer in online education, Ng co-founded Coursera and <a href="https://www.deeplearning.ai/" target="_blank" rel="noreferrer noopener nofollow">deeplearning.ai</a>. With his online courses, he has successfully spearheaded many efforts to “democratize deep learning” teaching over 2.5 million students through his online courses.&nbsp;</p>
</div>
</div>



<p>He is one of the world’s most famous and influential computer scientists being named one of Time magazine’s 100 Most Influential People in 2012, and Fast Company’s Most Creative People in 2014. Since 2018 he launched and currently heads AI Fund, initially a $175-million investment fund for backing artificial intelligence startups. He has founded Landing AI, which provides AI-powered SaaS products and Transformation Program to empower enterprises into cutting-edge AI companies.</p>



<p><span style="font-weight: 400;">⇒ Listen to </span><a href="https://www.youtube.com/watch?v=0jspaMLxBig" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Andrew Ng</span></a></p>



<p class="has-text-align-left"><a href="https://twitter.com/AndrewYNg" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/andrewyng/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://www.andrewng.org/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a><span style="font-weight: 400;"> || </span><a href="https://www.coursera.org/instructor/andrewng" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Coursera</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-12-oriol-vinyals">12. Oriol Vinyals</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Oriol Vinyals is a Principal Scientist at Google DeepMind, working in Deep Learning and Artificial Intelligence. Prior to joining DeepMind, Oriol was part of the Google Brain team.&nbsp;</p>



<p>He holds a Phd. in EECS from the University of California, Berkeley and is a recipient of the 2016 MIT TR35 innovator award.</p>



<p>Some of his contributions are used in Google Translate, Text-To-Speech, and Speech recognition, serving billions of queries every day, and he was the lead researcher of the AlphaStar project, creating an agent that defeated a top professional at the game of StarCraft, achieving Grandmaster level.&nbsp;</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Oriol-Vinyals.png?resize=251%2C251&#038;ssl=1" alt="Oriol Vinyals" class="wp-image-16734" style="width:251px;height:251px" width="251" height="251"/></figure>
</div></div>
</div>



<p>At DeepMind he continues working on his areas of interest, which include artificial intelligence, with particular emphasis on machine learning, deep learning and reinforcement learning.</p>



<p><span style="font-weight: 400;">⇒ Check out </span><a href="https://www.youtube.com/watch?v=Kedt2or9xlo" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Oriol Vinyals</span></a></p>



<p class="has-text-align-left"><a href="https://twitter.com/OriolVinyalsML" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/oriol-vinyals-00b3366/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://research.google/people/OriolVinyals/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Google Research</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-13-reza-zadeh">13. Reza Zadeh</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Reza-Zadeh.png?ssl=1" alt="Reza Zadeh" class="wp-image-16735"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Reza Zadeh is founder and CEO at Matroid and an Adjunct Professor at Stanford. His work focuses on Machine Learning, Distributed Computing, and Discrete Applied Mathematics.&nbsp;</p>



<p>He’s served on the Technical Advisory Boards of Microsoft and Databricks, and has been working on Machine Learning since 2005 when he worked in Google’s AI research team. His awards include a KDD Best Paper Award and the Gene Golub Outstanding Thesis Award at Stanford.&nbsp;</p>
</div>
</div>



<p class="has-text-align-left"><a href="http://stanford.edu/~rezab/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Stanford Profile</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/Reza_Zadeh" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/rezab/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-14-ben-goertzel">14. Ben Goertzel</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Ben Goertzel is an artificial intelligence researcher. Goertzel is the chief scientist of chairman of AI software company Novamente LLC; chairman of the OpenCog Foundation; and advisor to Singularity University. He was Director of Research of the Machine Intelligence Research Institute.</p>



<p>His research work encompasses artificial general intelligence, natural language processing, cognitive science, data mining, machine learning, computational finance, bioinformatics, virtual worlds and gaming and other areas. He has published a dozen scientific books, 100+ technical papers, and numerous journalistic articles. Before entering the software industry he served as a university faculty in several departments of mathematics, computer science and cognitive science, in the US, Australia and New Zealand.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Ben-Goertzel.png?ssl=1" alt="Ben Goertzel" class="wp-image-16724"/></figure>
</div></div>
</div>



<p class="has-text-align-left"><a href="https://www.linkedin.com/in/bengoertzel/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn </span></a><span style="font-weight: 400;">|| </span><a href="https://twitter.com/bengoertzel" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter </span></a><span style="font-weight: 400;">|| </span><a href="https://goertzel.org/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-15-adam-coates">15. Adam Coates</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Adam-Coates.png?ssl=1" alt="Adam Coates" class="wp-image-16719"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Director at Apple. He received his PhD from Stanford University in 2012 and was the director of the Silicon Valley AI Lab at Baidu Research until September 2017, then an Operating Partner at Khosla Ventures until 2018.&nbsp;</p>



<p>During his graduate career, he co-developed an autonomous aerobatic helicopter, worked on perception systems for household robots, and early large-scale deep learning methods. He developed&nbsp; deep learning software for high-performance computing systems with a team at Stanford, used for unsupervised learning, object detection and self-driving cars.</p>
</div>
</div>



<p>Previous projects:&nbsp; Baidu Deep Voice, Deep Speech.&nbsp; DL on COTS HPC, Stanford AI Robot, Stanford Autonomous Helicopter.</p>



<p class="has-text-align-left"><a href="https://www.linkedin.com/in/apcoates/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/adampaulcoates" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="http://www.apcoates.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-16-kirk-borne">16. Kirk Borne</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Worldwide top influencer since 2013. Data Scientist. Global Speaker. Consultant. Astrophysicist. Space Scientist.</p>



<p>Big Data &amp; Data Science advisor, TedX speaker, researcher, blogger, Data Literacy advocate. Currently Principal Data Scientist and Executive Advisor at Booz Allen Hamilton, Annapolis Junction, MD.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Kirk-Borne.png?ssl=1" alt="Kirk Borne" class="wp-image-16730"/></figure>
</div></div>
</div>



<p><a href="https://twitter.com/KirkDBorne" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/kirkdborne/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="http://kirkborne.net/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-17-ronald-von-loon">17. Ronald von Loon</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Ronald-van-Loon.png?ssl=1" alt="Ronald van Loon" class="wp-image-16736"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>A recognized expert and thought leader in Data Science, works with data-driven companies to generate business value so that they may meet and exceed goal after goal.</p>



<p>Ronald van Loon has been recognized for his work in the field of digital transformation by such publications and organizations as Onalytica, Dataconomy, and Klout. In addition to these recognitions, he is also an author for a number of leading big data websites, including The Guardian, The Datafloq, and Data Science Central, and he regularly speaks at renowned events and conferences.</p>
</div>
</div>



<p class="has-text-align-left"><a href="https://twitter.com/Ronald_vanLoon" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/ronald-van-loon-5411a/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://linktr.ee/RonaldvanLoon" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Other profiles</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-18-noam-chomsky">18. Noam Chomsky</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Noam Chomsky is an American linguist, philosopher, cognitive scientist, historian, social critic, and political activist. Sometimes called “the father of modern linguistics“, Chomsky is also a major figure in analytic philosophy and one of the founders of the field of cognitive science.&nbsp;</p>



<p>He holds a joint appointment as Institute Professor Emeritus at the Massachusetts Institute of Technology (MIT) and Laureate Professor at the University of Arizona, and is the author of more than 100 books on topics such as linguistics, war, politics, and mass media.</p>



<p>If you are interested in Natural Language Processing and cognitive science, you should follow Noam Chomsky.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Noam-Chomsky.png?ssl=1" alt="Noam Chomsky" class="wp-image-16733"/></figure>
</div></div>
</div>



<p><span style="font-weight: 400;">⇒ Listen to </span><a href="https://www.youtube.com/watch?v=cMscNuSUy0I" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Noam Chomsky about Language, Cognition, and Deep Learning on Artificial Intelligence (AI) Podcast</span></a></p>



<p class="has-text-align-left"><a href="https://twitter.com/noamchomskyT" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://chomsky.info/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a><span style="font-weight: 400;"> || </span><a href="https://www.facebook.com/Noam-Chomsky-294468630182/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Facebook</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-19-lex-fridman">19. Lex Fridman</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Lex-Fridman.png?ssl=1" alt="Lex Fridman" class="wp-image-16731"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Lex Fridman fields of expertise include research in human-centered AI, deep learning, autonomous vehicles &amp; robotics at MIT and beyond. Also, he teaches courses on deep learning.</p>



<p>He is known for his <a href="https://lexfridman.com/ai/">Artificial Intelligence Podcast</a> where he talks about all Data Science related topics with the most renowned scientists from the field.</p>
</div>
</div>



<p class="has-text-align-left"><a href="https://lexfridman.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a><span style="font-weight: 400;"> || </span><a href="https://twitter.com/lexfridman" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> || </span><a href="https://www.linkedin.com/in/lexfridman/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://www.youtube.com/lexfridman" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">YouTube</span></a><span style="font-weight: 400;"> || </span><a href="https://www.instagram.com/lexfridman/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Instagram</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-20-kai-fu-lee">20. Kai-Fu Lee</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Dr. Kai-Fu Lee is one of the world’s leading AI experts and has been in AI research, development, and investment for over 30 years. Dr. Lee is the Chairman and CEO of Sinovation Ventures, and the President of Sinovation’s Artificial Intelligence Institute, and former President of Google China.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Kai-Fu-Lee.png?ssl=1" alt="Kai-Fu Lee" class="wp-image-16729"/></figure>
</div></div>
</div>



<p><span style="font-weight: 400;">⇒ Watch </span><a href="https://www.youtube.com/watch?v=cQ48rP_Rs4g" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Lex Fridman interview with Kai-Fu Lee</span></a></p>



<p><a href="https://twitter.com/kaifulee" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Twitter</span></a><span style="font-weight: 400;"> ||</span><a href="https://www.linkedin.com/in/kaifulee/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;"> LinkedIn</span></a><span style="font-weight: 400;"> || </span><a href="https://aisuperpowers.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="font-weight: 400;">Website</span></a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-21-elon-musk">21. Elon Musk</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Elon-Musk.png?ssl=1" alt="Elon Musk" class="wp-image-34755"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Elon Musk co-founded and leads Tesla, SpaceX, Neuralink, and The Boring Company.</p>



<p>Previously, Musk co-founded and sold PayPal, the world&#8217;s leading Internet payment system, and Zip2, one of the first internet maps and directions services.</p>



<p>Although known for his controversial opinions, he’s one of the leading AI influencers in the world.</p>
</div>
</div>



<p><a href="https://twitter.com/elonmusk" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://www.instagram.com/elonmusk/?hl=en" target="_blank" rel="noreferrer noopener nofollow">Instagram</a> || <a href="https://neuralink.com/" target="_blank" rel="noreferrer noopener nofollow">Neuralink</a> || <a href="https://www.boringcompany.com/" target="_blank" rel="noreferrer noopener nofollow">The Boring Company</a> || <a href="https://www.spacex.com/" target="_blank" rel="noreferrer noopener nofollow">SpaceX </a>|| <a href="https://www.tesla.com/" target="_blank" rel="noreferrer noopener nofollow">Tesla</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-22-bernard-marr">22. Bernard Marr&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>He’s a world-renowned futurist, influencer, and thought leader in the field of business and technology. He is the author of 18 best-selling books, writes a regular column for Forbes, and advises and coaches many of the world’s best-known organizations. He has 2 million social media followers and was ranked by LinkedIn as one of the top 5 business influencers in the world and the No 1 influencer in the UK.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Bernard-Marr.png?ssl=1" alt="Bernard Marr" class="wp-image-34758"/></figure>
</div></div>
</div>



<p><a href="https://www.bernardmarr.com/default.asp" target="_blank" rel="noreferrer noopener nofollow">Website </a>|| <a href="https://www.linkedin.com/in/bernardmarr/" target="_blank" rel="noreferrer noopener nofollow">LinkedIn </a>|| <a href="https://twitter.com/BernardMarr" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://www.facebook.com/BernardWMarr/" target="_blank" rel="noreferrer noopener nofollow">Facebook</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-23-rachel-thomas">23. Rachel Thomas&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Rachel-Thomas-2.png?ssl=1" alt="Rachel Thomas" class="wp-image-34760"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Rachel Thomas is the co-founder of fast.ai, which created the Practical Deep Learning for Coders course taken by over 200,000 students and which has been featured in The Economist, MIT Tech Review, and Forbes. She was selected by Forbes as one of 20 Incredible Women in AI, earned her math PhD at Duke, and was an early engineer at Uber. Rachel is a popular writer and keynote speaker on topics of data ethics, AI accessibility, and bias in machine learning.</p>
</div>
</div>



<p><a href="https://www.usfca.edu/faculty/rachel-thomas" target="_blank" rel="noreferrer noopener nofollow">Website </a>|| <a href="https://www.linkedin.com/in/rachel-thomas-942a7923/" target="_blank" rel="noreferrer noopener nofollow">LinkedIn </a>|| <a href="https://twitter.com/math_rachel" target="_blank" rel="noreferrer noopener nofollow">Twitter</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-24-moustapha-cisse">24. Moustapha Cisse</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Moustapha Cisse is a research scientist at Google and head of the Google AI center in Accra, Ghana, where he leads research efforts in foundational machine learning and its applications to solving complex societal challenges.</p>



<p>Moustapha is also a professor of machine learning at the African Institute of Mathematical Sciences, where he is the founder and director of the African Masters of Machine Intelligence program. He was previously a research scientist at Facebook AI Research. Before that, he completed his PhD at University Pierre and Marie Curie in France.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Moustapha-Cisse.png?ssl=1" alt="Moustapha Cisse" class="wp-image-34762"/></figure>
</div></div>
</div>



<p><a href="https://twitter.com/moustapha_6c?lang=en" target="_blank" rel="noreferrer noopener nofollow">Twitter</a> || <a href="https://www.linkedin.com/in/moustapha-cisse/?originalSubdomain=gh" target="_blank" rel="noreferrer noopener nofollow">LinkedIn</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-25-kate-crawford">25. Kate Crawford</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Kate-Crawford.png?ssl=1" alt="Kate Crawford" class="wp-image-34764"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Kate Crawford is a leading researcher and professor in the fields of social implications of data systems, machine learning and artificial intelligence. She is a Senior Principal Researcher at MSR-NYC, the inaugural Visiting Chair for AI and Justice at the École Normale Supérieure in Paris, and the Miegunyah Distinguished Visiting Fellow at the University of Melbourne.&nbsp;</p>



<p>Kate is the co-founder of the AI Now Institute at New York University, the world&#8217;s first university institute dedicated to researching the social implications of artificial intelligence and related technologies.</p>
</div>
</div>



<p><a href="https://www.katecrawford.net/" target="_blank" rel="noreferrer noopener nofollow">Website </a>|| <a href="https://twitter.com/katecrawford" target="_blank" rel="noreferrer noopener nofollow">Twitter</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-26-sam-altman">26. Sam Altman</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Sam Altman is an entrepreneur, investor, programmer, and blogger. He is the CEO of OpenAI and the Chairman of Y Combinator, a leading silicon valley startup accelerator that has helped launch companies such as Reddit, Dropbox, and Airbnb. He is an investor in many companies, and a chairman of the board for Helion and Oklo, two nuclear energy companies.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Sam-Altman.png?ssl=1" alt="Sam Altman" class="wp-image-34766"/></figure>
</div></div>
</div>



<p><a href="https://twitter.com/sama" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://blog.samaltman.com/" target="_blank" rel="noreferrer noopener nofollow">Website</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-27-martin-ford">27. Martin Ford</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Martin-Ford.png?ssl=1" alt="Martin Ford" class="wp-image-34768"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>His book<em> Rise of the Robots: Technology and the Threat of a Jobless Future</em>, was a New York Times bestseller and won the £30,000 Financial Times and McKinsey Business Book of the Year Award.&nbsp;</p>



<p>Martin Ford is also the consulting artificial intelligence expert for the new Robotics and AI&nbsp; ETF from Lyxor/Societe Generale (Ticker ROAI), which is focused specifically on investing in companies that will be significant participants in the AI and robotics revolution. He holds a computer engineering degree from the University of Michigan, Ann Arbor and a graduate business degree from the University of California, Los Angeles.</p>
</div>
</div>



<p><a href="https://mfordfuture.com/" target="_blank" rel="noreferrer noopener nofollow">Website </a>|| <a href="https://twitter.com/MFordFuture" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://www.linkedin.com/in/mfordfuture/" target="_blank" rel="noreferrer noopener nofollow">LinkedIn</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-28-alexis-conneau">28. Alexis Conneau</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Alexis Conneau is a resident Ph.D. student at Facebook AI Research in Paris.&nbsp;</p>



<p>He focuses is in the area of deep learning for natural language processing (NLP). Specifically, he is working on transferable text representations using neural networks.</p>



<p>Conneau&#8217;s research interests include natural language understanding, sequence to sequence learning, and neural machine translation.</p>



<p><a href="https://www.linkedin.com/in/alexisconneau/" target="_blank" rel="noreferrer noopener nofollow">LinkedIn </a>|| <a href="https://twitter.com/alex_conneau" target="_blank" rel="noreferrer noopener nofollow">Twitter</a> || <a href="https://scholar.google.fr/citations?user=45KfCpgAAAAJ" target="_blank" rel="noreferrer noopener nofollow">Alexis Conneau on Google Scholar</a></p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Alex-Conneau.png?ssl=1" alt="" class="wp-image-34771"/></figure>
</div></div>
</div>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-29-andreas-maier">29. Andreas Maier&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Andreas-Maier-1.png?ssl=1" alt="" class="wp-image-34774"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Andreas Maier is an ML researcher and Professor at the Pattern Recognition Lab at the University of Erlangen-Nuremberg. He developed PEAKS, the first online tool to assess speech intelligibility. Since 2016, he is a member of the steering committee of the European Time Machine Consortium.</p>



<p>His current research interests focus on medical imaging, image and audio processing, digital humanities, and interpretable machine learning, and the use of known operators.</p>
</div>
</div>



<p><a href="https://twitter.com/maier_ak?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://lme.tf.fau.de/person/maier/" target="_blank" rel="noreferrer noopener nofollow">Website </a>|| <a href="https://scholar.google.com/citations?user=MA6SDuEAAAAJ&amp;hl=en" target="_blank" rel="noreferrer noopener nofollow">Andreas Maier on Google Scholar</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-30-francois-chollet">30. François Chollet&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>François Chollet is a software engineer and AI researcher currently working as a Staff Software Engineer at Google. He&#8217;s the creator of Keras, a leading deep learning framework for Python, and the author of <em>Deep Learning with Python</em>.</p>



<p>His primary interests involve general intelligence, making AI technology easy to understand, helping people use the full potential of AI, and understanding and simulating the early stages of human cognitive development.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Francois-Chollet-1.png?ssl=1" alt="François Chollet" class="wp-image-34778"/></figure>
</div></div>
</div>



<p><a href="https://www.linkedin.com/in/fchollet/" target="_blank" rel="noreferrer noopener nofollow">LinkedIn </a>|| <a href="https://twitter.com/fchollet" target="_blank" rel="noreferrer noopener nofollow">Twitter </a>|| <a href="https://fchollet.com/">Website</a> || <a href="https://scholar.google.com/citations?user=VfYhf2wAAAAJ&amp;hl=en">Google Scholar</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-31-geoffrey-hinton">31. Geoffrey Hinton</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/geoffrey-hinton-1.png?ssl=1" alt="geoffrey-hinton" class="wp-image-34780"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Geoffrey Hinton is an emeritus professor at the Department of Computer Science at</p>



<p>the University of Toronto. He is also a VP Engineering fellow at Google and Chief Scientific Adviser at the Vector Institute. He was one of the researchers who introduced the backpropagation algorithm and the first to use backpropagation for learning word embeddings. His other contributions to neural network research include <em>Boltzmann machines, distributed representations, time-delay neural nets, mixtures of experts, variational learning and deep learning</em>. His research group in Toronto made major breakthroughs in deep learning that <strong>revolutionized speech recognition and object classification</strong>.</p>
</div>
</div>



<p>Geoffrey Hinton is a fellow of the UK Royal Society and a foreign member of the US National Academy of Engineering and the American Academy of Arts and Sciences.</p>



<p>Hinton received the 2018 Turing Award, together with Yoshua Bengio and Yann LeCun, for their work on deep learning. They are sometimes referred to as the <strong>&#8220;Godfathers of AI&#8221; </strong>and <strong>&#8220;Godfathers of Deep Learning&#8221;</strong>.</p>



<p><a href="https://twitter.com/geoffreyhinton?lang=en">Twitter </a>|| <a href="http://www.cs.toronto.edu/~hinton/">Website</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-32-demis-hassabis">32. Demis Hassabis</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Demis Hassabis is an artificial intelligence researcher and neuroscientist. He is the CEO and co-founder of DeepMind and a UK Government AI Advisor since 2018. He’s also a five times winner of the Pentamind board games championship. Hassabis is recognized worldwide as one of the smartest thinkers in his field.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Demis_Hassabis-1.png?ssl=1" alt="Demis Hassabis
" class="wp-image-34782"/></figure>
</div></div>
</div>



<p><a href="https://twitter.com/demishassabis">Twitter </a>|| <a href="https://deepmind.com/">DeepMind</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-33-ian-j-goodfellow">33. Ian J. Goodfellow&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Ian-Goodfellow-1.png?ssl=1" alt="Ian Goodfellow" class="wp-image-34784"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Ian Goodfellow is a machine learning researcher. He’s the Director of Machine Learning at Apple’s Special Projects Group. He was previously employed as a research scientist at Google Brain. He’s the author of the <a href="http://www.deeplearningbook.org/"><em>Deep Learning</em></a> textbook. Goodfellow has made several contributions to the field of deep learning.</p>
</div>
</div>



<p><a href="https://www.linkedin.com/in/ian-goodfellow-b7187213/">LinkedIn</a> || <a href="https://www.iangoodfellow.com/">Website </a>|| <a href="https://twitter.com/goodfellow_ian">Twitter</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-34-jerome-pesenti">34. Jerome Pesenti&nbsp;</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Jerome Pesenti is the AI team leader at Facebook pursuing fundamental and applied research in AI and making Facebook products safer and more valuable to people through the use of AI. Prior to joining Facebook, Jerome joined IBM to lead the development of its Watson platform after the startup he co-founded, Vivisimo, was acquired by the company in 2012. He went on to later become the CEO of BenevolentTech.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Jerome-Pesenti.png?ssl=1" alt="Jerome Pesenti" class="wp-image-34786"/></figure>
</div></div>
</div>



<p><a href="https://twitter.com/an_open_mind">Twitter </a>|| <a href="https://www.linkedin.com/in/jpesenti/">LinkedIn</a></p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-35-yoshua-bengio">35. Yoshua Bengio</h2>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image is-style-rounded">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Yoshua-Bengio.png?resize=250%2C250&#038;ssl=1" alt="Yoshua Bengio" class="wp-image-34788" style="width:250px;height:250px" width="250" height="250"/></figure>
</div></div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>Yoshua Bengio is recognized as one of the world’s leading experts in artificial intelligence and a pioneer in deep learning. Since 1993, he has been a professor in the Department of Computer Science and Operational Research at the Université de Montréal. CIFAR’s Learning in Machines &amp; Brains Program Co-Director, he is also the founder and scientific director of Mila, the Quebec Artificial Intelligence Institute, the world’s largest university-based research group in deep learning.</p>



<p>In 2019, he received the ACM A.M. Turing Award, “the Nobel Prize of Computing”, jointly with Geoffrey Hinton and Yann LeCun for conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing.</p>
</div>
</div>



<p><a href="https://www.linkedin.com/in/yoshuabengio/?originalSubdomain=ca">LinkedIn</a> || <a href="https://yoshuabengio.org/">Website </a>|| <a href="https://scholar.google.com/citations?user=kukA0LcAAAAJ&amp;hl=en">Google Scholar</a></p>



<hr class="wp-block-separator has-css-opacity"/>



<p>Make sure to follow these great influencers to stay on top of the latest machine learning news, get inspired, and learn new, wonderful things.</p>



<p>What other machine learning influencers do you follow?</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1781</post-id>	</item>
		<item>
		<title>Optuna vs Hyperopt: Which Hyperparameter Optimization Library Should You Choose?</title>
		<link>https://neptune.ai/blog/optuna-vs-hyperopt</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 09:29:11 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/optuna-vs-hyperopt/</guid>

					<description><![CDATA[Thinking which library should you choose for hyperparameter optimization? Been using Hyperopt for a while and feel like changing? Just heard about&#160;Optuna&#160;and you want to see how it works? Good! In this article I will: Let’s do it. Evaluation criteria Ease of use and API In this section I want to see how to run&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Thinking which library should you choose for hyperparameter optimization?</p>



<p>Been using Hyperopt for a while and feel like changing?</p>



<p>Just heard about&nbsp;<a href="https://optuna.org/" target="_blank" rel="noreferrer noopener nofollow">Optuna</a>&nbsp;and you want to see how it works?</p>



<p>Good!</p>



<p>In this article I will:</p>



<ul class="wp-block-list">
<li>show you an example of using Optuna and Hyperopt on a real problem,</li>



<li>compare Optuna vs Hyperopt on API, documentation, functionality, and more,</li>



<li>give you my overall score and recommendation on which hyperparameter optimization library you should use.</li>
</ul>



<p>Let’s do it.</p>



<section id="blog-intext-cta-block_047006132f744c28a3e816d01d71e1c5" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-read-also">Read also</h3>
    
            <p><a href="/blog/hyperparameter-tuning-in-python-complete-guide" target="_blank" rel="noreferrer noopener">Hyperparameter Tuning in Python: a Complete Guide</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-evaluation-criteria">Evaluation criteria</h2>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-ease-of-use-and-api">Ease of use and API</h2>



<p>In this section I want to see how to run a basic hyperparameter tuning script for both libraries, see how natural and easy-to-use it is and what is the API.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>You&nbsp;define your&nbsp;<strong>search space and objective in one function</strong>.</p>



<p>Moreover, you sample the hyperparameters from the&nbsp;<em>trial</em>&nbsp;object. Because of that, the&nbsp;<strong>parameter space is defined at execution</strong>. For those of you who like Pytorch because of this&nbsp;<strong>imperative approach,</strong>&nbsp;Optuna will feel natural.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:10px"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(trial)</span>:</span>
    params = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: trial.suggest_loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>, <span class="hljs-number" style="color: teal;">0.01</span>, <span class="hljs-number" style="color: teal;">0.5</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>, <span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">30</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>, <span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">100</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>, <span class="hljs-number" style="color: teal;">10</span>, <span class="hljs-number" style="color: teal;">1000</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>: trial.suggest_uniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>, <span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>: trial.suggest_uniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>, <span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>)}
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> train_evaluate(params)</pre>



<p>Then, you create the&nbsp;<em>study</em>&nbsp;object and optimize it. What is great is that&nbsp;<strong>you can choose</strong>&nbsp;whether you want to&nbsp;<strong>maximize or minimize</strong>&nbsp;your objective. That is useful when optimizing a metric like AUC&nbsp; because you don’t have to change the sign of the objective before training and then convert best results after training to get a positive score.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study = optuna.create_study(direction=<span class="hljs-string" style="color: rgb(221, 17, 68);">'maximize'</span>)
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>)
</pre>



<p>That is it.</p>



<p>Everything you may want to know about the optimization is available in the&nbsp;<em>study</em>&nbsp;object.</p>



<p>What I love about Optuna is that I get to define how I want to sample my search space on-the-fly which gives me&nbsp;<strong>a lot of flexibility</strong>. Ability to choose a direction of optimization is also pretty nice.&nbsp;</p>



<p>If you want to see the full code example you can&nbsp;<a href="/blog/optuna-vs-hyperopt#12" target="_blank" rel="noreferrer noopener">scroll down to the Example script</a>.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>You start by defining your parameter search space:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:12px">SPACE = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>:
hp.loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>,np.log(<span class="hljs-number" style="color: teal;">0.01</span>),np.log(<span class="hljs-number" style="color: teal;">0.5</span>)),
         <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>:
hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>, range(<span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">30</span>, <span class="hljs-number" style="color: teal;">1</span>)),
         <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>:
hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>, range(<span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">100</span>, <span class="hljs-number" style="color: teal;">1</span>)),
         <span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>:
hp.uniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>, <span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>)}</pre>



<p>Then, you create an objective function that you want to minimize. That means you will have to&nbsp;<strong>flip the sign of your objective&nbsp;</strong>for the-higher-the-better metric like AUC.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(params)</span>:</span>
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> <span class="hljs-number" style="color: teal;">-1.0</span> * train_evaluate(params)</pre>



<p>Finally, you instantiate the&nbsp;<em>Trials()</em>&nbsp;object and minimize your&nbsp;<em>objective</em>&nbsp;on the parameter search&nbsp;<em>SPACE</em>.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">trials = Trials()
_ = fmin(objective, SPACE, trials=trials, algo=tpe.suggest, max_evals=<span class="hljs-number" style="color: teal;">100</span>)</pre>



<p>…and done!</p>



<p>All the information about the hyperparameters that were tested and the corresponding score are kept in the&nbsp;<em>trials</em>&nbsp;object.</p>



<p>The thing that I don’t like is the fact that I need to instantiate the&nbsp;<em>Trials()&nbsp;</em>even in the simplest of cases. I would rather have&nbsp;<em>fmin</em>&nbsp;return the&nbsp;<em>trials</em>&nbsp;and do the instantiation by default.&nbsp;</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-9-10"><strong>9 / 10</strong></h3>



<p></p>
</div>
</div>



<p>Both libraries do a good job here but I feel that&nbsp;<strong>Optuna is slightly better</strong>&nbsp;because of the flexibility, imperative approach to sampling parameters and a bit less boilerplate.&nbsp;</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Ease of use and API​​</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-options-methods-and-hyperhyperparameters">Options, methods, and hyper(hyperparameters)</h2>



<p>In real-life scenarios running hyperparameter optimization requires a lot of additional options away from the golden path. Areas that I am particularly interested in are:</p>



<ul class="wp-block-list">
<li>search space</li>



<li>optimization methods/algorithms</li>



<li>callbacks</li>



<li>persisting and restarting parameter sweeps</li>



<li>pruning unpromising runs</li>



<li>handling exceptions</li>
</ul>



<p>In this section I will compare Optuna and Hyperopt on exactly those.</p>



<h3 class="wp-block-heading" id="3">Search space</h3>



<p>In this section I want to compare the search space definition, flexibility in defining a complex space and sampling options for each parameter type (Float, Integer, Categorical).</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>You can find sampling options for all hyperparameter types:</p>



<ul class="wp-block-list">
<li>for categorical parameters you can use<em>&nbsp;trials.suggest_categorical</em></li>



<li>for integers there is&nbsp;<em>trials.suggest_int</em></li>



<li>for float parameters you have&nbsp;<em>trials.suggest_uniform</em>,&nbsp;<em>trials.suggest_loguniform</em>&nbsp;and even, more exotic,&nbsp;<em>trials.suggest_discrete_uniform</em></li>
</ul>



<p>Especially for the integer parameters you could wish for more options but it deals with most use-cases.&nbsp;Great feature of this library is that you sample from the parameter space on-the-fly and you can do it however you like.&nbsp;You can use if statements, you can change intervals from which you search, you can use the information from the&nbsp;<em>trial</em>&nbsp;object to guide your search.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:10px"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(trial)</span>:</span>
    classifier_name = trial.suggest_categorical(<span class="hljs-string" style="color: rgb(221, 17, 68);">'classifier'</span>, [<span class="hljs-string" style="color: rgb(221, 17, 68);">'SVC'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'RandomForest'</span>])
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">if</span> classifier_name == <span class="hljs-string" style="color: rgb(221, 17, 68);">'SVC'</span>:
        svc_c = trial.suggest_loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'svc_c'</span>, <span class="hljs-number" style="color: teal;">1e-10</span>, <span class="hljs-number" style="color: teal;">1e10</span>)
        classifier_obj = sklearn.svm.SVC(C=svc_c)
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">else</span>:
        rf_max_depth = int(trial.suggest_loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'rf_max_depth'</span>, <span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">32</span>))
        classifier_obj = sklearn.ensemble.RandomForestClassifier(max_depth=rf_max_depth)

    ...</pre>



<p>This is awesome, you can do literally anything!</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>Search space is where Hyperopt really gives you a ton of sampling options:</p>



<ul class="wp-block-list">
<li>for categorical parameters you have&nbsp;<em>hp.choice</em></li>



<li>for integers you get&nbsp;<em>hp.randit</em>,&nbsp;<em>hp.quniform</em>,&nbsp;<em>hp.qloguniform</em>&nbsp;and&nbsp;<em>hp.qlognormal</em></li>



<li>for floats we have&nbsp;<em>hp.normal</em>,&nbsp;&nbsp;<em>hp.uniform</em>,&nbsp;<em>hp.lognormal</em>&nbsp;and&nbsp;<em>hp.loguniform</em><strong>​</strong></li>
</ul>



<p>As far as I know this is the most extensive sampling functionality out there.</p>



<p>You define your search space before you run optimization but&nbsp;<strong>you can create very complex parameter spaces</strong>:&nbsp;</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:10px">SPACE = hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'classifier_type'</span>, [
    {
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'type'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'naive_bayes'</span>,
    },
    {
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'type'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'svm'</span>,
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'C'</span>: hp.lognormal(<span class="hljs-string" style="color: rgb(221, 17, 68);">'svm_C'</span>, <span class="hljs-number" style="color: teal;">0</span>, <span class="hljs-number" style="color: teal;">1</span>),
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'kernel'</span>: hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'svm_kernel'</span>, [
            {<span class="hljs-string" style="color: rgb(221, 17, 68);">'ktype'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'linear'</span>},
            {<span class="hljs-string" style="color: rgb(221, 17, 68);">'ktype'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'RBF'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'width'</span>: hp.lognormal(<span class="hljs-string" style="color: rgb(221, 17, 68);">'svm_rbf_width'</span>, <span class="hljs-number" style="color: teal;">0</span>, <span class="hljs-number" style="color: teal;">1</span>)},
            ]),
    },
    {
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'type'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'dtree'</span>,
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'criterion'</span>: hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'dtree_criterion'</span>, [<span class="hljs-string" style="color: rgb(221, 17, 68);">'gini'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'entropy'</span>]),
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>: hp.choice(<span class="hljs-string" style="color: rgb(221, 17, 68);">'dtree_max_depth'</span>,
            [<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">None</span>, hp.qlognormal(<span class="hljs-string" style="color: rgb(221, 17, 68);">'dtree_max_depth_int'</span>, <span class="hljs-number" style="color: teal;">3</span>, <span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">1</span>)]),
        <span class="hljs-string" style="color: rgb(221, 17, 68);">'min_samples_split'</span>: hp.qlognormal(<span class="hljs-string" style="color: rgb(221, 17, 68);">'dtree_min_samples_split'</span>, <span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">1</span>),
    },
    ])</pre>



<p>By combining&nbsp;<em>hp.choice&nbsp;</em>with other sampling methods we can have conditional spaces. This is&nbsp;<strong>useful when you are optimizing hyperparameters for a machine learning pipeline</strong>&nbsp;that involves preprocessing, feature engineering and model training.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>
</div>



<p>I have to say&nbsp;<strong>I like them both</strong>. I can define nested search spaces easily and I have a lot of sampling options for all the parameter types.&nbsp;<strong>Optuna has imperative parameter definition</strong>, which gives more flexibility while&nbsp;<strong>Hyperopt has more parameter sampling options</strong>.</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Search space​​​</strong></p>



<p>Optuna = Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading" id="4">Optimization methods</h3>



<p>Both Optuna and Hyperopt&nbsp;<strong>are using the same optimization methods</strong>&nbsp;under the hood. They have:</p>



<p><span style="text-decoration: underline;"><strong><em>rand.suggest</em></strong>&nbsp;(Hyperopt) and&nbsp;&nbsp;<strong><em>samplers.random.RandomSampler</em>&nbsp;</strong>(Optuna)</span></p>



<p>Your standard random search over the parameters.</p>



<p><span style="text-decoration: underline;"><em><strong>tpe.suggest</strong>&nbsp;</em>(Hyperopt) and&nbsp;&nbsp;<strong><em>samplers.tpe.sampler.TPESampler</em>&nbsp;</strong>(Optuna)</span></p>



<p>Tree of Parzen Estimators (TPE). The idea behind this method is similar to what was explained in the previous blog post about&nbsp;<a href="/blog/scikit-optimize" target="_blank" rel="noreferrer noopener">Scikit Optimize</a>.&nbsp;We&nbsp;<strong>use a cheap surrogate model to estimate the performance of the expensive objective function</strong>&nbsp;on a set of parameters.</p>



<p>The difference between the methods used in Scikit Optimize and Tree of Parzen Estimators (TPE) is that instead of estimating the actual performance (point estimation) we want to estimate the density in the tails. We want to be able to tell whether a run will be good (right tail) or bad (left tail).&nbsp;</p>



<p>I like the following explanation taken from the&nbsp;<a href="https://www.automl.org/wp-content/uploads/2019/05/AutoML_Book.pdf" target="_blank" rel="noreferrer noopener">AutoML_Book</a>&nbsp;by amazing folks over at&nbsp;<a href="https://www.automl.org/" target="_blank" rel="noreferrer noopener">AutoML.org Freiburg</a>.</p>



<blockquote class="wp-block-quote is-style-default is-layout-flow wp-block-quote-is-layout-flow">
<p><em>Instead of modeling the probability p(y|λ) of observations y given the configurations λ, the Tree Parzen Estimator models density functions p(λ|y &lt; α) and p(λ|y ≥ α). Given a percentile α (usually set to 15%), the observations are divided in good observations and bad observations and simple 1-d Parzen windows are used to model the two distributions.</em></p>
</blockquote>



<p>By using p(λ|y &lt; α) and p(λ|y ≥ α) you can estimate the expected improvement of a parameter configuration over previous best.</p>



<p>Interestingly, both for Optuna and Hyperopt, there are no options to specify the&nbsp;<strong>α</strong>parameter in the optimizer.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p><strong><em><u>integration.SkoptSampler</u></em></strong></p>



<p>Optuna lets you use samplers from Scikit-Optimize (skopt).&nbsp;</p>



<p>Skopt offers a bunch of Tree-Based methods as a choice for your surrogate model.&nbsp;</p>



<p>In order to use them you need to:</p>



<ul class="wp-block-list">
<li>create a&nbsp;<em>SkoptSampler&nbsp;</em>instance specifying the parameters of the surrogate model and acquisition function in the&nbsp;<em>skopt_kwargs</em>&nbsp;argument,&nbsp;</li>



<li>pass the&nbsp;<em>sampler</em>&nbsp;instance to the&nbsp;<em>optuna.create_study</em>&nbsp;method&nbsp;</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:12px"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> optuna.integration <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> SkoptSampler

sampler = SkoptSampler(skopt_kwargs={<span class="hljs-string" style="color: rgb(221, 17, 68);">'base_estimator'</span>:<span class="hljs-string" style="color: rgb(221, 17, 68);">'RF'</span>,
                                     <span class="hljs-string" style="color: rgb(221, 17, 68);">'n_random_starts'</span>:<span class="hljs-number" style="color: teal;">10</span>,
                                     <span class="hljs-string" style="color: rgb(221, 17, 68);">'base_estimator'</span>:<span class="hljs-string" style="color: rgb(221, 17, 68);">'ET'</span>,
                                     <span class="hljs-string" style="color: rgb(221, 17, 68);">'acq_func'</span>:<span class="hljs-string" style="color: rgb(221, 17, 68);">'EI'</span>,
                                     <span class="hljs-string" style="color: rgb(221, 17, 68);">'acq_func_kwargs'</span>: {<span class="hljs-string" style="color: rgb(221, 17, 68);">'xi'</span>:<span class="hljs-number" style="color: teal;">0.02</span>})
study = optuna.create_study(sampler=sampler)
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>)</pre>



<p><em><strong>pruners.SuccessiveHalvingPruner</strong></em></p>



<p>You can also use one of the multiarmed bandit methods called Asynchronous Successive Halving Algorithm (ASHA). If you are interested in the details&nbsp;<a href="https://arxiv.org/abs/1810.05934" target="_blank" rel="noreferrer noopener">please read the paper</a>&nbsp;but the general idea is to:</p>



<ul class="wp-block-list">
<li>run a bunch of parameter configurations for some time</li>



<li>prune the (half of) the least promising runs every&nbsp;</li>



<li>run a bunch of parameter configurations for some more time</li>



<li>prune the (half of) the least promising runs every&nbsp;</li>



<li>stop when only one configuration is left</li>
</ul>



<p>By doing so, the search can focus on the more promising runs. However, the static allocation of the budgets to configurations is a problem in practice (which a newer approach called&nbsp;<a href="https://arxiv.org/abs/1603.06560" target="_blank" rel="noreferrer noopener">HyperBand</a>&nbsp;solves).&nbsp;</p>



<p>It is very easy to use ASHA in Optuna. Just pass a&nbsp;<em>SuccesiveHalvingPruner</em>&nbsp;to&nbsp;<em>.create_study()</em>&nbsp;and you are good to go:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> optuna.pruners <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> SuccessiveHalvingPruner

optuna.create_study(pruner=SuccessiveHalvingPruner())
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>)</pre>



<p>Nice and simple.</p>



<p>If you would like to learn more, you may want to check out my&nbsp;<a href="/blog/scikit-optimize" target="_blank" rel="noreferrer noopener">article about Scikit Optimize</a>.</p>



<p>Overall, there are a lot of options when it comes to optimization functions right now. However there are some important ones, like&nbsp;<a href="https://github.com/automl/HpBandSter" target="_blank" rel="noreferrer noopener">Hyperband or BOHB</a>&nbsp;missing.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-8-10"><strong>8 / 10</strong></h3>



<p></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p><em><strong>atpe.suggest</strong></em></p>



<p>Recently added, adaptive TPE was invented at ElectricBrain and it is actually a series of (not so) little improvements that they experimented with on top of TPE.&nbsp;</p>



<p>The authors explain their approach and modifications they made to TPE thoroughly in this fascinating&nbsp;<a href="https://github.com/electricbrainio/hypermax" target="_blank" rel="noreferrer noopener nofollow">blog post.</a></p>



<p>It is super easy to use. Instead of&nbsp;<em>tpe.suggest</em>&nbsp;you need to pass&nbsp;<em>atpe.suggest</em>&nbsp;to your&nbsp;<em>fmin</em>&nbsp;function.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> hyperopt <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> fmin, atpe

best = fmin(objective, SPACE,
            max_evals=<span class="hljs-number" style="color: teal;">100</span>,
&nbsp;           algo=atpe.suggest)
</pre>



<p>I really like this effort to include new optimization algorithms in the library, especially since it’s a new original approach not just an integration with existing algorithm.</p>



<p>Hopefully, in the future multi-armed bandid methods like Hyperband, BOHB, or tree-based methods like SMAC3 will be included as well.&nbsp;</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-8-10"><strong>8 / 10</strong></h3>
</div>
</div>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Optimization methods</strong></p>



<p>Optuna = Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading" id="5">Callbacks</h3>



<p>In this section I want to see how easy it is to define callbacks to monitor/snapshot/modify training after each iteration. It is useful, especially when your training is long and/or distributed.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>User callbacks are&nbsp;<strong>nicely supported</strong>&nbsp;with the&nbsp;<em>callbacks</em>&nbsp;argument in of the&nbsp;<em>.optimize()</em>&nbsp;method. Just pass a list of callables that take&nbsp;<em>study</em>&nbsp;and&nbsp;<em>trial</em>&nbsp;as input and you are good to go.&nbsp;</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>def neptune_monitor(study, trial):
    neptune_run["score"] = trial.value
    neptune_run["parameters"] = trial.params

... 
study.optimize(objective, n_trials=100, callbacks=[neptune_monitor])</code></pre>
</div>




<p>Because you can access both&nbsp;<em>study</em>&nbsp;and&nbsp;<em>trial</em>&nbsp;you have all the flexibility you can possibly want to checkpoint, do early stopping or modify future search.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>There are no callbacks per se, but you can put your callback function inside the&nbsp;<em>objective</em>&nbsp;and it will be executed every time the&nbsp;<em>objective</em>&nbsp;is called.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--unset l-margin__bottom--unset block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code>def neptune_monitor(params, score):
    neptune_run["score"] = score
    neptune_run["parameters"] = params

def objective(params):
    score = -1.0 * train_evaluate(params)
    monitor_callback(params, score)
    return score</code></pre>
</div>




<p>I don’t love it but I guess I can live with that.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-6-10"><strong>6 / 10</strong></h3>
</div>
</div>



<p>Optuna makes it really easy with the&nbsp;<em>callbacks</em>&nbsp;argument while in Hyperopt you have to modify the objective.&nbsp;&nbsp;</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Callbacks</strong>​​</p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading" id="6">Persisting and restarting</h3>



<p>Saving and loading your hyperparameter searches can save you time, money, and can help get better results. Let’s compare both frameworks on that.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>Simply use&nbsp;<em>joblib.dump</em>&nbsp;to pickle the&nbsp;<em>trials</em>&nbsp;object.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>)
joblib.dump(study, <span class="hljs-string" style="color: rgb(221, 17, 68);">'artifacts/study.pkl'</span>)</pre>



<p>… and you can load it later with&nbsp;<em>joblib.load&nbsp;</em>to restart your search.&nbsp;</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study = joblib.load(<span class="hljs-string" style="color: rgb(221, 17, 68);">'../artifacts/study.pkl'</span>)
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">200</span>)</pre>



<p>That’s it.</p>



<p>For&nbsp;<strong>distributed setups</strong>&nbsp;you can use the&nbsp;<strong>name</strong>&nbsp;of the study the&nbsp;<strong>URL to the database</strong>&nbsp;where you distributed study is to instantiate new study. For example:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study = optuna.create_study(
                    study_name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'example-study'</span>,
                    storage=<span class="hljs-string" style="color: rgb(221, 17, 68);">'sqlite:///example.db'</span>,
                    load_if_exists=<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">True</span>)
</pre>



<p>Nice and easy.</p>



<p>More about running distributed hyperparameter optimization with Optuna in the&nbsp;<a href="/blog/optuna-vs-hyperopt#11" target="_blank" rel="noreferrer noopener">Speed and Parallelization</a>&nbsp;secion.&nbsp;&nbsp;</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>Similarly to Optuna use&nbsp;<em>joblib.dump</em>&nbsp;to pickle the&nbsp;<em>trials</em>&nbsp;object.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">trials = Trials()
_ = fmin(objective, SPACE, trials=trials,
         algo=tpe.suggest, max_evals=<span class="hljs-number" style="color: teal;">100</span>)
joblib.dump(trials, <span class="hljs-string" style="color: rgb(221, 17, 68);">'artifacts/hyperopt_trials.pkl'</span>)</pre>



<p>… load it with&nbsp;<em>joblib.load&nbsp;</em>and restart.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">trials = joblib.load(<span class="hljs-string" style="color: rgb(221, 17, 68);">'artifacts/hyperopt_trials.pkl'</span>)
_ = fmin(objective, SPACE, trials=trials,
         algo=tpe.suggest, max_evals=<span class="hljs-number" style="color: teal;">200</span>)</pre>



<p>Simple and works with no problems.</p>



<p>If you are optimizing hyperparameters in a&nbsp;<strong>distributed</strong>&nbsp;fashion you can load&nbsp;<em>MongoTrials()&nbsp;</em>object that connects to&nbsp; MongoDB. More about running distributed hyperparameter optimization with Hyperopt in the&nbsp;<a href="/blog/optuna-vs-hyperopt#11" target="_blank" rel="noreferrer noopener">Speed and Parallelization</a>&nbsp;section.&nbsp;&nbsp;</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>



<p></p>
</div>
</div>



<p>Both make it easy and get the job done.</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Persisting and restarting​</strong></p>



<p>Optuna = Hyperopt</p>



<p><a href="https://neptune.ai/blog/optuna-vs-hyperopt#content-list"></a></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading" id="7">Run Pruning</h3>



<p>Not all hyperparameter configurations are created equal. For some of them you can tell very quickly that they will not produce high scores. Ideally, you would like to stop those runs as soon as possible try different parameters instead.&nbsp;</p>



<p>Optuna gives you an option to do that with&nbsp;<strong>Pruning Callbacks.&nbsp;</strong>Many machine learning frameworks are supported:</p>



<ul class="wp-block-list">
<li><em>KerasPruningCallback, TFKerasPruningCallback</em></li>



<li><em>TensorFlowPruningHook</em></li>



<li><em>PyTorchIgnitePruningHandler, PyTorchLightningPruningCallback</em></li>



<li><em>FastAIPruningCallback</em></li>



<li><em>LightGBMPruningCallback</em></li>



<li><em>XGBoostPruningCallback</em></li>



<li><em>and more</em></li>
</ul>



<p>You can&nbsp;<a href="https://optuna.readthedocs.io/en/latest/reference/integration.html" target="_blank" rel="noreferrer noopener">read about them in the docs</a>.</p>



<p>For example, in the case of lightGBM training you would pass this callback to the&nbsp;<em>lgb.train&nbsp;</em>function.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:12px"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">train_evaluate</span><span class="hljs-params">(X, y, params, pruning_callback=None)</span>:</span>
    X_train, X_valid, y_train, y_valid = train_test_split(X, y, test_size=<span class="hljs-number" style="color: teal;">0.2</span>, random_state=<span class="hljs-number" style="color: teal;">1234</span>)

    train_data = lgb.Dataset(X_train, label=y_train)
    valid_data = lgb.Dataset(X_valid, label=y_valid, reference=train_data)

    callbacks = [pruning_callback] <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">if</span> pruning_callback <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">is</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">not</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">None</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">else</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">None</span>

    model = lgb.train(params, train_data,
                      num_boost_round=NUM_BOOST_ROUND,
                      early_stopping_rounds=EARLY_STOPPING_ROUNDS,
                      valid_sets=[valid_data],
                      valid_names=[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>],
                      callbacks=callbacks)
    score = model.best_score[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>][<span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>]
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> score

<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(trial)</span>:</span>
    params = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: trial.suggest_loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>, <span class="hljs-number" style="color: teal;">0.01</span>, <span class="hljs-number" style="color: teal;">0.5</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>, <span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">30</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>, <span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">100</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>, <span class="hljs-number" style="color: teal;">10</span>, <span class="hljs-number" style="color: teal;">1000</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>: trial.suggest_uniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>, <span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>: trial.suggest_uniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>, <span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>)}

    pruning_callback = LightGBMPruningCallback(trial, <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>)
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> train_evaluate(params, pruning_callback)</pre>



<p>Only Optuna gives you this option so it is a clear win.</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Run Pruning​​</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading" id="8">Handling exceptions</h3>



<p>If one of your runs fails due to the wrong parameter combination, random training error or some other problem you could lose all the&nbsp;<em>parameter_configuration:score</em>&nbsp;pairs evaluated so far in a study.&nbsp;</p>



<p>You can use callbacks to save this information after every iteration or use a DB to store it as explained in the&nbsp;<a href="/blog/optuna-vs-hyperopt#11" target="_blank" rel="noreferrer noopener">Speed and Parallelization</a>&nbsp;section.</p>



<p>However, you may want to let this study continue even when the exception happens. To make it possible, Optuna let’s you pass the allowed exceptions to the&nbsp;<em>.optimize()&nbsp;</em>method.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);font-size:12px"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(trial)</span>:</span>
    params = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: trial.suggest_loguniform(<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>, <span class="hljs-number" style="color: teal;">0.01</span>, <span class="hljs-number" style="color: teal;">0.5</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>, <span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">30</span>),
              <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>: trial.suggest_int(<span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>, <span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">100</span>)}

    print(non_existent_variable)

    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> train_evaluate(params)

study = optuna.create_study(direction=<span class="hljs-string" style="color: rgb(221, 17, 68);">'maximize'</span>)
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>, catch=(NameError,))</pre>



<p>Again, only Optuna supports this.</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Handling exceptions​​</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-documentation">Documentation</h2>



<p>When you are a user of a library or a framework it is absolutely crucial to find the information you need when you need it. This is where documentation/support channels come into the picture and they can make or break a library.</p>



<p>Let’s see how Optuna and Hyperopt compare on that.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>It is&nbsp;<strong>really good</strong>.</p>



<p>There is a&nbsp;<a href="https://optuna.org/" target="_blank" rel="noreferrer noopener nofollow">proper webpage</a>&nbsp;that explains all the basic concepts and shows you where to find more information.</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/optuna_docs-1.png?ssl=1" alt="" class="wp-image-20413"/></figure>



<p>Also, there is a complete and very easy-to-understand&nbsp;<a href="https://optuna.readthedocs.io/en/latest/tutorial/index.html" target="_blank" rel="noreferrer noopener">documentation on read-the-docs.</a></p>



<p>It contains:</p>



<ul class="wp-block-list">
<li>Tutorials with both simple and advanced examples</li>



<li>API Reference with all the functions containing beautiful docstrings. To give you an idea imagine having charts inside of your docstrings so that you can understand what is happening inside your function better. Check out the&nbsp;<em><a href="https://optuna.readthedocs.io/en/latest/reference/samplers.html#optuna.samplers.BaseSampler" target="_blank" rel="noreferrer noopener">BaseSampler</a>&nbsp;</em>if you don’t believe me.</li>
</ul>



<p>It is also important to mention that the supporting team from&nbsp;<a href="https://preferred.jp/ja/" target="_blank" rel="noreferrer noopener">Preferred Networks</a>&nbsp;really takes care of this project. They respond to Github issues and the community is growing around it with great feature ideas and PRs coming in. Checkout the&nbsp;<a href="https://github.com/pfnet/optuna/issues" target="_blank" rel="noreferrer noopener">Github project issues section</a>&nbsp;to see what is going on there.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>It was recently updated and now it is quite&nbsp;<strong>alright</strong>.</p>



<p>You can find it&nbsp;<a href="http://hyperopt.github.io/hyperopt/scaleout/mongodb/" target="_blank" rel="noreferrer noopener nofollow">here</a>.</p>



<p>You can easily find information about:</p>



<ul class="wp-block-list">
<li>how to get started</li>



<li>how to define both simple and advances search spaces</li>



<li>how to run the installation</li>



<li>how to run Hyperopt in parallel via MongoDB or Spark</li>
</ul>



<p>Unfortunately, there were some things that I didn’t like:</p>



<ul class="wp-block-list">
<li>missing API reference with the docstrings all functions/methods</li>



<li>docstrings themselves are missing for most of methods/functions which forces you to read the implementation (there are some positive side effects here:) )</li>



<li>no examples of using Adaptive TPE<em>.&nbsp;</em>I wasn’t sure if I am using it correctly, whether I should specify some additional (hyper)hyper parameters. Missing docstrings didn’t help me here either.</li>



<li>some links to 404 in the docs.</li>
</ul>



<p>Overall, it has improved a lot lately, but I was still a bit lost at times. I hope that with time it will get even better so stay tuned.&nbsp;</p>



<p>The good thing is<strong>, there are a lot of blog posts about it</strong>. Some of them that I found useful are:</p>



<ul class="wp-block-list">
<li><a href="https://medium.com/district-data-labs/parameter-tuning-with-hyperopt-faa86acdfdce" target="_blank" rel="noreferrer noopener">“Parameter Tuning with Hyperopt”</a>&nbsp;by District Data Labs</li>



<li><a href="https://medium.com/vooban-ai/hyperopt-tutorial-for-optimizing-neural-networks-hyperparameters-e3102814b919" target="_blank" rel="noreferrer noopener">“Hyperopt tutorial for Optimizing Neural Networks’ Hyperparameters”</a>&nbsp;by Vooban</li>



<li><a href="https://blog.goodaudience.com/on-using-hyperopt-advanced-machine-learning-a2dde2ccece7" target="_blank" rel="noreferrer noopener">“On Using Hyperopt: Advanced Machine Learning”</a>&nbsp;by Tanay Agrawal</li>



<li><a href="https://towardsdatascience.com/an-introductory-example-of-bayesian-optimization-in-python-with-hyperopt-aae40fff4ff0" target="_blank" rel="noreferrer noopener">“An Introductory Example of Bayesian Optimization in Python with Hyperopt”</a>&nbsp;by Will Koehrsen</li>
</ul>



<p>The documentation is<strong>&nbsp;not the strongest side</strong>&nbsp;of this project but because it’s a classic there are a lot of resources out there.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-6-10"><strong>6 / 10</strong></h3>
</div>
</div>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Documentation​​</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-visualizations">Visualizations</h2>



<p>Visualizing hyperparameter searches can be very useful. You can gain information on interactions between parameters and see where you should search next.</p>



<p>That is why I want to compare visualization suits that Optuna and Hyperopt offer.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>A few great visualizations are available in the&nbsp;<em><strong>optuna.visualization&nbsp;</strong></em>module:</p>



<ul class="wp-block-list">
<li><em>plot_contour:</em>&nbsp;plots parameter interactions on an interactive chart. You can choose which hyperparameters you would like to explore.</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">plot_contour(study, params=[<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>,
                            <span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>,
                            <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>,
                            <span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>,
                            <span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>,
                            <span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>])</pre>



<figure class="wp-block-video"><video controls src="https://neptune.ai/wp-content/uploads/optuna_contour_plot-1.mp4"></video></figure>



<ul class="wp-block-list">
<li><em>plot_optimization_histor:</em>&nbsp;shows the scores from all trials as well as the best score so far at each point.</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">plot_optimization_history(study)</pre>



<figure class="wp-block-video"><video controls src="https://neptune.ai/wp-content/uploads/optuna_history_plot-1.mp4"></video></figure>



<ul class="wp-block-list">
<li><em>plot_parallel_coordinate:</em>&nbsp;interactively visualizes the hyperparameters and scores</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">plot_parallel_coordinate(study)</pre>



<figure class="wp-block-video"><video controls src="https://neptune.ai/wp-content/uploads/optuna_parallel_plot-1.mp4"></video></figure>



<ul class="wp-block-list">
<li><em>plot_slice:</em>&nbsp;shows the&nbsp;<strong>evolution of the search</strong>. You can see where in the hyperparameter space your search went and&nbsp;<strong>which parts of the space were explored more.</strong></li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">plot_slice(study)</pre>



<figure class="wp-block-video"><video controls src="https://neptune.ai/wp-content/uploads/optuna_slice_plot-1.mp4"></video></figure>



<p>Overall,&nbsp;<strong>visualizations in Optuna are incredibile</strong>!</p>



<p>They let you zoom in on the hyperparameter interactions and help you decide on how to run your next parameter sweep. Amazing job.</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>There are three visualization functions in the&nbsp;<em><strong>hyperopt.plotting</strong></em>&nbsp;module:&nbsp;</p>



<ul class="wp-block-list">
<li><em>main_plot_history:</em>&nbsp;shows you the results of each iteration and highlights the best score.</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">main_plot_history(trials)
</pre>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/hyperopt_main_plot-history.png?ssl=1" alt="hyperopt main_plot_history"/></figure>



<ul class="wp-block-list">
<li><em>main_plot_histogram:</em>&nbsp;shows you the histogram of results over all iterations.</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">main_plot_histogram(trials)
</pre>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/hyperopt_main_plot_historgram.png?ssl=1" alt="hyperopt main_plot_histogram"/></figure>



<ul class="wp-block-list">
<li><em>main_plot_vars:&nbsp;</em>I don’t really know what it does as I couldn’t get it to run and there were no docstrings nor examples (again, the documentation is far from perfect).</li>
</ul>



<p>Summing up, there are some basic visualization utilities but they<strong>&nbsp;are not super useful.</strong></p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-3-10"><strong>3 / 10</strong></h3>
</div>
</div>



<p>I am very impressed by the visualizations available in Optuna. Useful, interactive, and beautiful.&nbsp;</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Visualizations​​</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<section id="note-block_600fdcb34a5f91b0eea93cac5558e85c"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-note__header">
            Note:        </h3>
    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p><!-- wp:paragraph --></p>
<p>If you want to play with those visualizations you can use the <em><strong>study</strong></em> object that I saved as ‘study.pkl’ for each experiment.</p>
<p><!-- /wp:paragraph --></p>
                                    </div>

            </div>
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>For example go to <a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/e/BLOG-404/artifacts" target="_blank" rel="noreferrer noopener">artifacts of this one.</a></p>
                                    </div>

            </div>
            </div>


</section>



<div id="separator-block_a598cca5a960f9b50a12788e86130c48"
         class="block-separator block-separator--5">
</div>



<section id="blog-intext-cta-block_63391da05539b679340dff0a2e9b1124" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-you-also-may-like">You also may like</h3>
    
            <p>  <a href="/blog/the-best-tools-to-visualize-metrics-and-hyperparameters-of-machine-learning-experiments" target="_blank" rel="noreferrer noopener">The Best Tools to Visualize Metrics and Hyperparameters of Machine Learning Experiments</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-speed-and-parallelization">Speed and parallelization</h2>



<p>When it comes to hyperparameter optimization, being able to distribute your training on your machine or many machines (cluster) can be crucial.&nbsp;</p>



<p>That is why, I checked the distributed training options for both Optuna and Hyperopt.</p>



<div class="wp-block-columns border-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-optuna">Optuna</h2>



<p>You can run distributed hyperparameter optimization on one machine or a cluster of machines and it is actually really simple.</p>



<p>For one machine you simply change the&nbsp;<em>n_jobs</em>&nbsp;parameter in your&nbsp;<em>.optimize()</em>method.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>, n_jobs=<span class="hljs-number" style="color: teal;">12</span>)</pre>



<p>To run it on a cluster you need to&nbsp;<strong>create a study that resides in a database</strong>&nbsp;(you can&nbsp;<a href="https://optuna.readthedocs.io/en/latest/tutorial/004_distributed.html#distributed" target="_blank" rel="noreferrer noopener">choose among many Relational DBs</a>).&nbsp;</p>



<p>There are two options to do that. You can do it via command line interface:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">optuna create-study
    --study-name <span class="hljs-string" style="color: rgb(221, 17, 68);">"distributed-example"</span>
    --storage <span class="hljs-string" style="color: rgb(221, 17, 68);">"sqlite:///example.db"</span></pre>



<p>You can also create a study in your&nbsp;optimization script.</p>



<p>By using&nbsp;<em>load_if_exists=True&nbsp;</em>you can&nbsp;<strong>treat your master script and worker scripts in the same way</strong>&nbsp;which simplifies things a lot!</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">study = optuna.create_study(
    study_name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'distributed-example'</span>,
    storage=<span class="hljs-string" style="color: rgb(221, 17, 68);">'sqlite:///example.db'</span>,
    load_if_exists=<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">True</span>)
study.optimize(objective, n_trials=<span class="hljs-number" style="color: teal;">100</span>)</pre>



<p>Finally, you can run your worker scripts from many machines and they will all use the same information from the study database.&nbsp;</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">terminal-1$ python run_worker.py</pre>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">terminal-25$ python run_worker.py</pre>



<p>Easy and works like a charm!</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-10-10"><strong>10 / 10</strong></h3>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-hyperopt">Hyperopt</h2>



<p>You can distribute your computation over a cluster of machines. Good, step-by-step instructions can be found in this&nbsp;<a href="https://blog.goodaudience.com/on-using-hyperopt-advanced-machine-learning-a2dde2ccece7" target="_blank" rel="noreferrer noopener">blog post</a>&nbsp;by Tanay Agrawal but in a nutshell, you need to:</p>



<ul class="wp-block-list">
<li><strong>Start a server with MongoDB</strong>&nbsp;on it which will consume results from your worker training scripts and send out the next parameter set to try,</li>



<li>In your training script, instead of&nbsp;<em>Trials()</em>&nbsp;create a&nbsp;<em>MongoTrials()</em>&nbsp;object pointing to the database server you have started in the previous step,</li>



<li>Move your&nbsp;<em>objective</em>&nbsp;function to a separate&nbsp;<em>objective.py</em>&nbsp;script and rename it to function,</li>



<li>Compile your Python training script,</li>



<li>Run&nbsp;<em><strong>hyperopt-mongo-worker</strong></em></li>
</ul>



<p>Though it gets the job done it doesn’t feel quite perfect. You need to do some juggling around the&nbsp;<em>objective</em>&nbsp;function, and starting MongoDB could have been provided in the CLI to makes things easier.</p>



<p>It is also important to mention that&nbsp;<strong>integration with Spark</strong>&nbsp;via&nbsp;<em>SparkTrials</em>&nbsp;object was recently added. There is a&nbsp;<a href="http://hyperopt.github.io/hyperopt/scaleout/spark/" target="_blank" rel="noreferrer noopener">step by step guide</a>&nbsp;to help you get started and you can even use the&nbsp;<a href="https://github.com/hyperopt/hyperopt/blob/master/download_spark_dependencies.sh" target="_blank" rel="noreferrer noopener">spark-installation script</a>&nbsp;to makes things easier.&nbsp;</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">best = hyperopt.fmin(fn = objective,
                     space = search_space,
                     algo = hyperopt.tpe.suggest,
                     max_evals = <span class="hljs-number" style="color: teal;">64</span>,
                     trials = hyperopt.SparkTrials())</pre>



<p>Works exactly the way you would expect it to work.</p>



<p>Nice and simple!</p>



<h3 class="wp-block-heading has-text-align-center" class="wp-block-heading has-text-align-center" id="h-9-10"><strong>9 / 10</strong></h3>
</div>
</div>



<p>Both libraries support distributed training which is great. However, Optuna does a bit better job with simpler, more user-friendly interface.</p>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Speed and parallelization</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-experimental-results">Experimental results*</h2>



<p>* Just to be clear those are the&nbsp;<strong>results on just one example problem&nbsp;</strong>and&nbsp;<strong>one run per lib/configuration</strong>&nbsp;and they do not guarantee generalization. To run a proper benchmark, you would run it multiple times on various datasets.</p>



<p>That being said, as a practitioner, I would hope to see some improvements over the random search for each problem. Otherwise, why bother with an HPO library?</p>



<p>Ok, so as an example let’s tweak the hyperparameters of the&nbsp;<strong>lightGBM</strong>&nbsp;model on a tabular,&nbsp;<strong>binary classification</strong>&nbsp;problem. If you want to use the same dataset as I did you should:</p>



<ul class="wp-block-list">
<li><a href="https://www.kaggle.com/c/santander-customer-transaction-prediction/data" target="_blank" rel="noreferrer noopener">download it from kaggle</a></li>



<li>use the<strong>&nbsp;first 10000 rows</strong>&nbsp;from the<em>&nbsp;train.csv</em>&nbsp;file</li>
</ul>



<p>To make the training quick I fixed the&nbsp;<strong>number of boosting rounds to 300 with a 30 round early stopping</strong>.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> lightgbm <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> lgb
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.model_selection <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> train_test_split

NUM_BOOST_ROUND = <span class="hljs-number" style="color: teal;">300</span>
EARLY_STOPPING_ROUNDS = <span class="hljs-number" style="color: teal;">30</span>

<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">train_evaluate</span><span class="hljs-params">(X, y, params)</span>:</span>
    X_train, X_valid, y_train, y_valid = train_test_split(X, y,
                                                          test_size=<span class="hljs-number" style="color: teal;">0.2</span>,
                                                          random_state=<span class="hljs-number" style="color: teal;">1234</span>)

    train_data = lgb.Dataset(X_train, label=y_train)
    valid_data = lgb.Dataset(X_valid, label=y_valid, reference=train_data)

    model = lgb.train(params, train_data,
                      num_boost_round=NUM_BOOST_ROUND,
                      early_stopping_rounds=EARLY_STOPPING_ROUNDS,
                      valid_sets=[valid_data],
                      valid_names=[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>])

    score = model.best_score[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>][<span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>]
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> score</pre>



<p>All the training and evaluation logic is put inside the&nbsp;<em>train_evaluate</em>&nbsp;function. We can&nbsp;<strong>treat it as a black box</strong>&nbsp;that takes the data and hyperparameter set and produces the AUC evaluation score.</p>



<section id="note-block_292c132bc964007fd4916aa9df895d23"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-note__header">
            Note:        </h3>
    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>You can actually turn every script that takes parameters as inputs and outputs the score into such <strong>train_evaluate.</strong> Once that is done you can treat it as black box and tune your parameters.</p>
                                    </div>

            </div>
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>I show how to do that step-by-step in a different post <a href="https://neptune.ai/blog/hyperparameter-tuning-on-any-python-script" target="_blank" rel="noreferrer noopener">“How to Do Hyperparameter Tuning on Any Python Script in 3 Easy Steps​”</a>.</p>
                                    </div>

            </div>
                    <div class="c-item c-item--image">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <img decoding="async" src="https://neptune.ai/wp-content/uploads/2022/10/Micro-Pictogram-12.svg" class="attachment-full size-full" alt="" />                                    </div>

            </div>
            </div>


</section>



<p>To train a model on a set of parameters you need to run something like this:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> pandas <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> pd

N_ROWS=<span class="hljs-number" style="color: teal;">10000</span>
TRAIN_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">'/mnt/ml-team/minerva/open-solutions/santander/data/train.csv'</span>

data = pd.read_csv(TRAIN_PATH, nrows=N_ROWS)
X = data.drop([<span class="hljs-string" style="color: rgb(221, 17, 68);">'ID_code'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'target'</span>], axis=<span class="hljs-number" style="color: teal;">1</span>)
y = data[<span class="hljs-string" style="color: rgb(221, 17, 68);">'target'</span>]

MODEL_PARAMS = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'boosting'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'gbdt'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'objective'</span>:<span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'metric'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_threads'</span>: <span class="hljs-number" style="color: teal;">12</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: <span class="hljs-number" style="color: teal;">0.3</span>,
                }

score = train_evaluate(X, y, MODEL_PARAMS)
print(<span class="hljs-string" style="color: rgb(221, 17, 68);">'Validation AUC: {}'</span>.format(score))</pre>



<p>For this study, I tried to find the best parameters within&nbsp;<strong>100 run budget</strong>.</p>



<p>I ran 6 experiments:</p>



<ul class="wp-block-list">
<li>Random search (from hyperopt) as a reference&nbsp;</li>



<li>Tree of Parzen Estimator search strategies for both Optuna and Hyperopt</li>



<li>Adaptive TPE from Hyperopt</li>



<li>TPE from Optuna with a pruning callback for more runs but within the same time frame. It turns out that 400 runs with pruning takes as much time as 100 runs without it.&nbsp;</li>



<li>Optuna with Random Forest surrogate model from skopt.Sampler</li>
</ul>



<p>See an&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/e/BLOG-433/source-code?path=.&amp;file=search_optuna.py" target="_blank" rel="noreferrer noopener">example hyperparameter optimization script</a>&nbsp;here.</p>


<div class="wp-block-image">
<figure class="aligncenter"><a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/experiments?viewId=817cbbbb-103e-11ea-9a39-42010a840083"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/optuna_vs_dashboard.png?ssl=1" alt="optuna vs hyperopt"/></a><figcaption class="wp-element-caption"><em>Experiments for Optuna and Hyperopt in different configurations</em></figcaption></figure>
</div>


<p>If you want to explore all of those experiments in more detail you can simply go to the&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/experiments?viewId=817cbbbb-103e-11ea-9a39-42010a840083" target="_blank" rel="noreferrer noopener">experiment dashboard</a>.</p>



<p><strong>Both Optuna and Hyperopt improved over the random search</strong>&nbsp;which is good.</p>



<p>TPE implementation from&nbsp;<strong>Optuna was slightly better than Hyperopt’s</strong>&nbsp;Adaptive TPE but not by much. On the other hand, when running hyperparameter optimization, those small improvements are exactly what you are going for.</p>



<p><strong>What is interesting is that TPE implementation from HPO and Optuna give vastly different results on this problem.&nbsp;</strong>Maybe the cutoff point between good and bad parameter configurations&nbsp;<em><strong>λ&nbsp;</strong></em>is chosen differently or sampling methods have defaults that work better for this particular problem.&nbsp;</p>



<p>Moreover,&nbsp;<strong>using pruning decreased training time by 4x</strong>. I could run 400 searches in the time that runs 100 without pruning. On the flip side,&nbsp;<strong>using pruning got a lower score.</strong>&nbsp;It may be different for your problem but it is important to consider that when making a decision whether to use pruning or not.</p>



<p>For this section, I assigned points based on the improvements over the random search strategy.</p>



<ul class="wp-block-list">
<li><strong>Hyperopt</strong>&nbsp;got (0.850 – 0.844)*100 =<strong>&nbsp;6</strong></li>



<li><strong>Optuna&nbsp;</strong>got&nbsp;(0.854 – 0.844)*100 =<strong>&nbsp;10</strong></li>
</ul>



<hr class="wp-block-separator has-css-opacity"/>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Experimental results</strong></p>



<p><span style="text-decoration: underline;"><strong>Optuna</strong>&nbsp;</span>&gt; Hyperopt</p>



<p><a href="https://neptune.ai/blog/optuna-vs-hyperopt#content-list"></a></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-conclusions">Conclusions</h2>



<p>Let’s take a look at the overall scores:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/optuna_vs_hyperopt_conclusion-1.png?ssl=1" alt="optuna vs hyperopt"/></figure>
</div>


<p>Even if you look at it generously and consider only the features that both libraries share,&nbsp;<strong>Optuna is a better framework.</strong></p>



<p>It is on-par or slightly better on all criteria and:&nbsp;</p>



<ul class="wp-block-list">
<li>it has better documentation</li>



<li>it has way better visualization suite</li>



<li>it has some features like pruning, callbacks, and exception handling that hyperopt doesn’t support</li>
</ul>



<p>After doing all this research I am convinced that&nbsp;<strong>Optuna is a great library</strong>&nbsp;for hyperparameter optimization.</p>



<p>Moreover, I think that&nbsp;<strong>you should strongly consider switching from Hyperopt</strong>&nbsp;if you were using that in the past.&nbsp;</p>



<section id="blog-intext-cta-block_17c4cc45d002e6339d99d14a766fb714" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-may-be-useful">May be useful</h3>
    
            <p>  <a href="https://towardsdatascience.com/hyperparameter-tuning-with-keras-and-ray-tune-1353e6586fda" target="_blank" rel="noreferrer noopener">Hyperparameter tuning with Keras and Ray Tune</a></p>
    
    </section>
]]></content:encoded>
					
		
		<enclosure url="https://neptune.ai/wp-content/uploads/optuna_contour_plot-1.mp4" length="1130602" type="video/mp4" />
<enclosure url="https://neptune.ai/wp-content/uploads/optuna_history_plot-1.mp4" length="415551" type="video/mp4" />
<enclosure url="https://neptune.ai/wp-content/uploads/optuna_parallel_plot-1.mp4" length="2187813" type="video/mp4" />
<enclosure url="https://neptune.ai/wp-content/uploads/optuna_slice_plot-1.mp4" length="906482" type="video/mp4" />

		<post-id xmlns="com-wordpress:feed-additions:1">1685</post-id>	</item>
		<item>
		<title>Scikit Optimize: Bayesian Hyperparameter Optimization in Python</title>
		<link>https://neptune.ai/blog/scikit-optimize</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 09:24:19 +0000</pubDate>
				<category><![CDATA[ML Tools]]></category>
		<guid isPermaLink="false">https://neptune.test/scikit-optimize/</guid>

					<description><![CDATA[Need to tune hyperparameters of your machine learning model and don’t want to do it by hand?&#160; Thinking about performing bayesian hyperparameter optimization but you are not sure how to do that exactly? Heard of various hyperparameter optimization libraries and wondering whether Scikit Optimize is the right tool for you?&#160; You are in the right&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Need to tune hyperparameters of your machine learning model and don’t want to do it by hand?&nbsp;</p>



<p>Thinking about performing bayesian hyperparameter optimization but you are not sure how to do that exactly?</p>



<p>Heard of various hyperparameter optimization libraries and wondering whether <a href="https://scikit-optimize.github.io/" target="_blank" rel="noreferrer noopener nofollow">Scikit Optimize</a> is the right tool for you?&nbsp;</p>



<p>You are in the right place.</p>



<p>In this article I will:</p>



<ul class="wp-block-list">
<li>Show you an <strong>example of using skopt</strong> to run bayesian hyperparameter optimization on a real problem,</li>



<li><strong>Evaluate this library</strong> based on various criteria like API, speed and experimental results,</li>



<li>Give you my <strong>overall score and recommendation</strong> on when to use it.</li>
</ul>



<p>Let&#8217;s dive in, shall we?</p>



<section id="blog-intext-cta-block_43ed020aca80776dac8c07f37f78a3d6" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-read-also">Read also</h3>
    
            <p>  <a href="/blog/hyperparameter-tuning-in-python-a-complete-guide-2020" target="_blank" rel="noreferrer noopener">Hyperparameter Tuning in Python: a Complete Guide 2020</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-evaluation-criteria">Evaluation criteria</h2>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-ease-of-use-and-api">Ease of use and API</h2>



<p>The API is just awesome. It is so simple, that you can almost guess it without reading the docs. Seriously, let me show you.</p>



<p>You define the search space:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">SPACE = [
   skopt.space.Real(<span class="hljs-number" style="color: teal;">0.01</span>, <span class="hljs-number" style="color: teal;">0.5</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>, prior=<span class="hljs-string" style="color: rgb(221, 17, 68);">'log-uniform'</span>),
   skopt.space.Integer(<span class="hljs-number" style="color: teal;">1</span>, <span class="hljs-number" style="color: teal;">30</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'max_depth'</span>),
   skopt.space.Integer(<span class="hljs-number" style="color: teal;">2</span>, <span class="hljs-number" style="color: teal;">100</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>),
   skopt.space.Integer(<span class="hljs-number" style="color: teal;">10</span>, <span class="hljs-number" style="color: teal;">1000</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'min_data_in_leaf'</span>),
   skopt.space.Real(<span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>, prior=<span class="hljs-string" style="color: rgb(221, 17, 68);">'uniform'</span>),
   skopt.space.Real(<span class="hljs-number" style="color: teal;">0.1</span>, <span class="hljs-number" style="color: teal;">1.0</span>, name=<span class="hljs-string" style="color: rgb(221, 17, 68);">'subsample'</span>, prior=<span class="hljs-string" style="color: rgb(221, 17, 68);">'uniform'</span>)]</pre>



<p>You define the objective function that you want to minimize (decorate it, to keep the parameter names):</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-meta" style="font-weight: 700; color: rgb(153, 153, 153);">@skopt.utils.use_named_args(SPACE)</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">objective</span><span class="hljs-params">(**params)</span>:</span>
    all_params = {**params, **STATIC_PARAMS}
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> <span class="hljs-number" style="color: teal;">-1.0</span> * train_evaluate(X, y, all_params)</pre>



<p>And run the optimization:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">results = skopt.forest_minimize(objective, SPACE, **HPO_PARAMS)
</pre>



<p>That’s it. All the information you need, like the best parameters or scores for each iteration, are kept in the results object. Go here for an example of a full script with some additional bells and whistles.</p>



<p>Super-easy setup and intuitive API.</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>10 / 10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-options-methods-and-hyperparameters">Options, methods, and (hyper)parameters</h2>



<h3 class="wp-block-heading" id="3">Search space</h3>



<p>When it comes to hyperparameter search space you can choose from three options:</p>



<ul class="wp-block-list">
<li><em>space.Real</em>&nbsp;-float parameters are sampled by uniform log-uniform from the(a,b) range,</li>



<li><em>space.Integer</em>&nbsp;-integer parameters are sampled uniformly from the(a,b) range,</li>



<li><em>space.Categorical&nbsp;</em>-for categorical (text) parameters. A value will be sampled from a list of options. For example, you could pass [‘gbdt’,’dart’,’goss’] if you are training lightGBM.</li>
</ul>



<p>There is&nbsp;<strong>no support for nested search spaces</strong>&nbsp;that account for the situations where some combinations of hyperparameters are simply invalid. It really comes in handy sometimes.</p>



<h3 class="wp-block-heading" id="4">Optimization methods</h3>



<p>There are four optimization algorithms to try.</p>



<p><strong>dummy_minimize</strong></p>



<p>You can run a simple random search over the parameters. Nothing fancy here but it is useful to have this option within the same API to compare if needed.</p>



<p><strong>forest_minimize and gbrt_minimize</strong></p>



<p>Both of those methods as well as the one in the next section are examples of Bayesian Hyperparameter Optimization also known as Sequential Model-Based Optimization SMBO. The idea behind this approach is to&nbsp;<strong>estimate</strong>&nbsp;the user-defined&nbsp;<strong>objective function</strong>&nbsp;<strong>with</strong>&nbsp;the <a href="/blog/random-forest-regression-when-does-it-fail-and-why" target="_blank" rel="noreferrer noopener">random forest</a>, extra trees, or gradient boosted trees&nbsp;<strong>regressor</strong>.</p>



<p>After each run of hyperparameters on the objective function, the algorithm makes an&nbsp;<strong>educated guess which set of hyperparameters is most likely to improve the score</strong>&nbsp;and should be tried in the next run. It is done by getting regressor predictions on many points (hyperparameter sets) and choosing the point that is the best guess based on the so-called acquisition function.</p>



<p>There are quite a few acquisition function options to choose from:</p>



<ul class="wp-block-list">
<li><em><strong>EI and PI</strong></em>: Negative expected improvement and Negative probability improvement. If you choose one of those you should tweak the&nbsp;<strong><em>xi</em></strong>&nbsp;parameter as well. Basically, when your algorithm is looking for the next set of hyperparameters, you can decide how small of the expected improvement you are willing to try on the actual objective function. The higher the value, the bigger the improvement (or probability of improvement) your regressor expects.</li>



<li><strong><em>LCB</em></strong>: Lower confidence bound. In this case, you want to choose your next point carefully, limiting the downside risk. You can decide how much risk you want to take at each run. By making the&nbsp;<strong><em>kappa</em></strong>&nbsp;parameter small you lean toward&nbsp;<strong>exploitation</strong>&nbsp;of what you know, by making it larger you lean toward&nbsp;<strong>exploration</strong>&nbsp;of the search space.</li>
</ul>



<p>There are also options&nbsp;<strong><em>EIPS</em></strong>&nbsp;and&nbsp;<strong><em>PIPS</em></strong>&nbsp;which take into account both the score produced by the objective function and the execution time but I haven’t tried them</p>



<p><strong>gp_minimize</strong></p>



<p>Instead of using the tree regressors, the&nbsp;<strong>objective function is approximated by the Gaussian process</strong>.</p>



<p>From a user perspective, the added value of this method is that instead of deciding beforehand on one of the acquisition functions, you can let the algorithm select the best one of EI, PI, and LCB at every iteration. Just set the acquisition function to&nbsp;<em>gp_hedge</em>&nbsp;and try it out.</p>



<p>One more thing to consider is the&nbsp;<strong>optimization method used at each iteration</strong>,&nbsp;<em>sampling</em>&nbsp;or&nbsp;<em>lbfgs</em>. For both of them, the acquisition function is calculated over a randomly selected number of points (<em>n_points</em>) in the search space. If you go with sampling, then the point with the lowest value is selected. If you choose&nbsp;<em>lbfgs</em>, the algorithm will take some number (n_restarts_optimizer) of the best, randomly tried points, and will run the&nbsp;<em>lbfgs</em>&nbsp;optimization starting at each of them. So basically the&nbsp;<em>lbfgs</em>&nbsp;method is just an improvement over the sampling method if you don’t care about the execution time.</p>



<h3 class="wp-block-heading" id="6">Persisting and restarting</h3>



<p>There are&nbsp;<em>skopt.dump</em>&nbsp;and&nbsp;<em>skopt.load</em>&nbsp;functions that deal with saving and loading the&nbsp;<em>results</em>&nbsp;object:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">results = skopt.forest_minimize(objective, SPACE, **HPO_PARAMS)
skopt.dump(results, <span class="hljs-string" style="color: rgb(221, 17, 68);">'artifacts/results.pkl'</span>)
old_results = skopt.load(<span class="hljs-string" style="color: rgb(221, 17, 68);">'artifacts/results.pkl'</span>)</pre>



<p>You can restart training from the saved results via&nbsp;<em>x0</em>&nbsp;and&nbsp;<em>y0</em>&nbsp;arguments. For example:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">results = skopt.forest_minimize(objective, SPACE,
                                x0=old_results.x_iters,
                                y0=old_results.func_vals,
                                **HPO_PARAMS)</pre>



<p>Simple and works with no problems.</p>



<p>Overall, there are a lot of options for tuning (hyper)hyperparameters and you can control the training with callbacks. On the flip side, you can only search through a flat space and you need to deal with those forbidden combinations of parameters on your own.</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>7 / 10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-documentation">Documentation</h2>



<p>Piece of art.</p>



<p>It’s extensive with a lot of examples, docstrings for all the functions and methods. It took me just a few minutes to get into the groove of things and get things off the ground.</p>



<p>Go to the&nbsp;<a href="https://scikit-optimize.github.io/" target="_blank" rel="noreferrer noopener nofollow">documentation webpage</a>&nbsp;to see for yourself.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_docs.png?ssl=1" alt="skopt documentation"/></figure>
</div>


<p>It could be a bit better, with more explanations in the docstrings, but the overall experience is just great.</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>9 / 10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-visualizations">Visualizations</h2>



<p>This is one of my favorite features of this library. There are three plotting utilities in the&nbsp;<em>skopt.plots</em>&nbsp;module, that I really love:</p>



<ul class="wp-block-list">
<li><em>plot_convergence</em>&nbsp;-it visualizes the progress of your optimization by showing the best to date result at each iteration.</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> skopt.plots

skopt.plots.plot_convergence(results)</pre>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_convergence.png?resize=768%2C576&#038;ssl=1" alt="skopt plot_convergence" style="width:768px;height:576px" width="768" height="576"/></figure>
</div>


<p>What is cool about it, is that you can compare the progress of many strategies by simply passing a list of&nbsp;<em>results</em>&nbsp;objects or a<strong>&nbsp;list of (name, results) tuples</strong>.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">results = [(<span class="hljs-string" style="color: rgb(221, 17, 68);">'random_results'</span>, random_results),
           (<span class="hljs-string" style="color: rgb(221, 17, 68);">'forest_results'</span>, forest_results),
           (<span class="hljs-string" style="color: rgb(221, 17, 68);">'gbrt_results'</span>, gbrt_results),
           (<span class="hljs-string" style="color: rgb(221, 17, 68);">'gp_results'</span>, gp_results)]

skopt.plots.plot_convergence(*results)</pre>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_convergence_many.jpeg?resize=768%2C461&#038;ssl=1" alt="skopt plot_convergence" style="width:768px;height:461px" width="768" height="461"/></figure>
</div>


<ul class="wp-block-list">
<li><em>plot_evaluations</em>&nbsp;-this plot lets you see the evolution of the search. For each hyperparameter, we see the histogram of explored values. For each pair of hyperparameters, the scatter plot of sampled values is plotted with the evolution represented by color, from blue to yellow.</li>
</ul>



<p>For example, when we look at the&nbsp;<strong>random search strategy</strong>&nbsp;we can see there is no evolution. It is just randomly searched:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt-evaluations_random.png?resize=750%2C739&#038;ssl=1" alt="skopt plot_evaluations" style="width:750px;height:739px" width="750" height="739"/></figure>
</div>


<p>But for the&nbsp;<em>forest_minimze</em><strong>&nbsp;strategy,</strong>&nbsp;we can clearly see that it converges to certain parts of space which it explores more heavily.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_evaluations_forest.png?resize=735%2C736&#038;ssl=1" alt="skopt plot_evaluations" style="width:735px;height:736px" width="735" height="736"/></figure>
</div>


<ul class="wp-block-list">
<li><em>plot_objective</em>&nbsp;-it lets you gain intuition into the score sensitivity with respect to hyperparameters. You can decide which parts of the space may require a more fine-grained search and which hyperparameters barely affect the score and can potentially be dropped from the search.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_objective.png?resize=768%2C576&#038;ssl=1" alt="skopt plot_objective" style="width:768px;height:576px" width="768" height="576"/></figure>
</div>


<p>Overall, visualizations are incredibly good.</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>10 / 10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<section id="blog-intext-cta-block_c51778faf6beedf3b1ff895dea31695c" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-see-also">See also</h3>
    
            <p>  <a href="/blog/the-best-tools-to-visualize-metrics-and-hyperparameters-of-machine-learning-experiments" target="_blank" rel="noreferrer noopener">The Best Tools to Visualize Metrics and Hyperparameters of Machine Learning Experiments</a></p>
    
    </section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-speed-and-parallelization">Speed and parallelization</h2>



<p>Every optimization function comes with the&nbsp;<em>n_jobs</em>&nbsp;parameter, which is passed to the&nbsp;<em>base_estimator</em>. That means, even though the optimization runs go sequentially you can speed up each run by utilizing more resources.</p>



<p>I haven’t run a proper timing benchmark for all the optimization methods and n_jobs. However, since I kept track of the total execution time for all experiments I decided to present average times for everything I ran:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_speed.png?ssl=1" alt="skopt speed"/></figure>
</div>


<p>Obviously, the&nbsp;<strong>random search method was the fastest</strong>, as it doesn’t need any calculations between the runs. It was followed by the&nbsp;<strong>gradient boosted trees regressor</strong>&nbsp;and&nbsp;<strong>random forest methods</strong>. Optimization via&nbsp;<strong>the Gaussian process was the slowest</strong>&nbsp;by a large margin but I only tested the&nbsp;<em>gp_hedge</em>&nbsp;acquisition function, so that might have been the reason.</p>



<p>Because there is no option to distribute it on the run level, over a cluster of workers, I have to take a few points away.</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>6 / 10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-experimental-results">Experimental results</h2>



<p>As an example let’s tweak the hyperparameters of the&nbsp;<strong>lightGBM</strong>&nbsp;model on a tabular,&nbsp;<strong>binary classification</strong>&nbsp;problem. If you want to use the same dataset as I did you should:</p>



<ul class="wp-block-list">
<li><a href="https://www.kaggle.com/c/santander-customer-transaction-prediction/data" target="_blank" rel="noreferrer noopener">download it from kaggle</a></li>



<li>use the<strong>&nbsp;first 10000 rows</strong>&nbsp;from the train.csv file</li>
</ul>



<p>To make the training quick I fixed the&nbsp;<strong>number of boosting rounds to 300 with a 30 round early stopping</strong>.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> lightgbm <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> lgb
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.model_selection <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> train_test_split

NUM_BOOST_ROUND = <span class="hljs-number" style="color: teal;">300</span>
EARLY_STOPPING_ROUNDS = <span class="hljs-number" style="color: teal;">30</span>

<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">train_evaluate</span><span class="hljs-params">(X, y, params)</span>:</span>
    X_train, X_valid, y_train, y_valid = train_test_split(X, y,
                                                          test_size=<span class="hljs-number" style="color: teal;">0.2</span>,
                                                          random_state=<span class="hljs-number" style="color: teal;">1234</span>)

    train_data = lgb.Dataset(X_train, label=y_train)
    valid_data = lgb.Dataset(X_valid, label=y_valid, reference=train_data)

    model = lgb.train(params, train_data,
                      num_boost_round=NUM_BOOST_ROUND,
                      early_stopping_rounds=EARLY_STOPPING_ROUNDS,
                      valid_sets=[valid_data],
                      valid_names=[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>])

    score = model.best_score[<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid'</span>][<span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>]
    <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">return</span> score</pre>



<p>All the training and evaluation logic is put inside the&nbsp;<strong>train_evaluate</strong>&nbsp;function. We can&nbsp;<strong>treat it as a black box</strong>&nbsp;that takes the data and hyperparameter set and produces the AUC evaluation score.</p>



<section id="note-block_9f422d954afcda24282cf15d3e6bc038"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-note__header">
            Note:        </h3>
    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>You can turn every script that takes parameters as inputs and outputs the score into such <strong>train_evaluate.</strong> Once that is done you can treat it as a black box and tune your parameters.</p>
                                    </div>

            </div>
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>I show how to do that step-by-step in a different post <a href="/blog/hyperparameter-tuning-on-any-python-script" target="_blank" rel="noopener">“How to Do Hyperparameter Tuning on Any Python Script in 3 Easy Steps​”</a>.</p>
                                    </div>

            </div>
                    <div class="c-item c-item--image">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                                                                </div>

            </div>
            </div>


</section>



<div id="separator-block_361e07a35ab5b4350449f04291ede781"
         class="block-separator block-separator--5">
</div>



<p>To train a model on a set of parameters&nbsp;you can run something like this:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> pandas <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> pd

N_ROWS=<span class="hljs-number" style="color: teal;">10000</span>
TRAIN_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">'/mnt/ml-team/minerva/open-solutions/santander/data/train.csv'</span>

data = pd.read_csv(TRAIN_PATH, nrows=N_ROWS)
X = data.drop([<span class="hljs-string" style="color: rgb(221, 17, 68);">'ID_code'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'target'</span>], axis=<span class="hljs-number" style="color: teal;">1</span>)
y = data[<span class="hljs-string" style="color: rgb(221, 17, 68);">'target'</span>]

MODEL_PARAMS = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'boosting'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'gbdt'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'objective'</span>:<span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'metric'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_threads'</span>: <span class="hljs-number" style="color: teal;">12</span>,
                <span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: <span class="hljs-number" style="color: teal;">0.3</span>,
                }

score = train_evaluate(X, y, MODEL_PARAMS)
print(<span class="hljs-string" style="color: rgb(221, 17, 68);">'Validation AUC: {}'</span>.format(score))</pre>



<p>For this study, I will try to find the best parameters within&nbsp;<strong>100 runs budget</strong>.</p>



<p>If you&nbsp;<strong>search randomly</strong>&nbsp;over hyperparameters<strong>&nbsp;you can get 0.864</strong>&nbsp;as I showed in this&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/e/BLOG-90/logs" target="_blank" rel="noreferrer noopener">ml experiment</a>.</p>



<p>To find the best model I tried various configurations of optimizers and hyper(hyperparameters) from the&nbsp;<a href="/blog/scikit-optimize#2" target="_blank" rel="noreferrer noopener">Options, methods, and hyper(hyperparameters)</a>&nbsp; section. You can also check the example&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/e/BLOG-90/source-code?file=search_random.py" target="_blank" rel="noreferrer noopener">skopt parameter tuning</a>&nbsp;script here.</p>



<p>In total I&nbsp;<strong>ran 87 experiments</strong>&nbsp;but let’s take a look at the top few:</p>


<div class="wp-block-image">
<figure class="aligncenter"><a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/experiments?viewId=817cbbbb-103e-11ea-9a39-42010a840083&amp;trashed=false&amp;searchMode=simple&amp;lbViewUnpacked=true&amp;tags=%5B%22skopt%22%5D"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_best_results-1.png?ssl=1" alt="skopt experiments"/></a><figcaption class="wp-element-caption"><em>Experiments for different skopt configurations</em></figcaption></figure>
</div>


<p>If you want to explore all of those experiments in more detail you can simply go to the&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/experiments?viewId=817cbbbb-103e-11ea-9a39-42010a840083&amp;trashed=false&amp;searchMode=simple&amp;lbViewUnpacked=true&amp;tags=%5B%22skopt%22%5D" target="_blank" rel="noreferrer noopener">experiment dashboard</a>.</p>



<p>The&nbsp;<em>forest_minimize</em><strong>&nbsp;method was the clear winner</strong>&nbsp;but to get good results, it was crucial to tweak the (hyper)hyperparameters a bit. For the&nbsp;<em>LCB</em>&nbsp;acquisition function, a lower value of&nbsp;<em>kappa</em>&nbsp;(exploitation) was better. Let’s take a look at the evaluations plot for this experiment:&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_results_evaluation.png?resize=745%2C737&#038;ssl=1" alt="skopt plot_evaluations" style="width:745px;height:737px" width="745" height="737"/></figure>
</div>


<p>It exploited the low&nbsp;<em>num_leaves</em>&nbsp;subspace but it was very exploratory for the&nbsp;<em>max_depth</em>&nbsp;and&nbsp;<em>feature_fraction</em>. It’s important to mention that those plots differed a lot from experiment to experiment. It makes you wonder how easy it is to get stuck in a local minimum.</p>



<p>However, the<strong>&nbsp;best result was achieved with the EI acquisition</strong>&nbsp;function. Again, tweaking the&nbsp;<em>xi</em>&nbsp;parameter was needed. Looking at the objective plot of this experiment:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_results_objective.png?resize=765%2C737&#038;ssl=1" alt="skopt plot_objective" style="width:765px;height:737px" width="765" height="737"/></figure>
</div>


<p>I get the feeling that by dropping some insensitive dimensions (<em>subsample</em>,&nbsp;<em>max_depth</em>) and running a more fine-grained search on the other hyperparameters I could have gotten a bit better result.</p>



<p>It was a surprise to me that the results for the&nbsp;<em>gp_minimze</em>&nbsp;were significantly worse when I used the lbfgs optimization of the acquisition function. They couldn’t beat random search. Changing the optimization to sampling got better AUC but was still worse than&nbsp;<em>forest_minimize</em>&nbsp;and&nbsp;<em>gbrt_minimize</em>. Go to&nbsp;<a href="https://ui.neptune.ai/jakub-czakon/blog-hpo/experiments?viewId=dc5bdd19-0ff3-4ac8-9d4a-b695545ab68d" target="_blank" rel="noreferrer noopener">gaussian process experiments</a>&nbsp;to see for yourself.</p>



<p>Overall the&nbsp;<strong>highest score I could squeeze was 0.8566</strong>&nbsp;which was better than random search’s 0.8464 by ~0.01. I will translate that to&nbsp;<strong>10 points</strong>&nbsp;(0.01*100).</p>



<blockquote class="wp-block-quote has-text-align-center is-style-large is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>10/10</strong></p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-conclusions">Conclusions</h2>



<p>Let’s take a look at the results for all criteria:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/skopt_results_conclusions.png?ssl=1" alt="scikit optimize evaluation"/></figure>
</div>


<p>Overall,<strong>&nbsp;I really like Scikit-Optimize</strong>. It is a pleasure to use, gives you great results, and useful visualizations. Also, it has a lot of options to tweak with strong documentation to guide you through it.</p>



<p>On the flip side, it is&nbsp;<strong>difficult</strong>, if not impossible,&nbsp;<strong>to parallelize it run-wise</strong>&nbsp;and distribute over a cluster of machines. I think going forward, this is going to be more important and can make this library not suitable for some applications.</p>



<p>My recommendation is to&nbsp;<strong>use it if you don’t care that much about the speed and parallelization</strong>&nbsp;but look elsewhere if those are crucial to your project.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1635</post-id>	</item>
		<item>
		<title>Machine Learning Experiment Management: How to Organize Your Model Development Process</title>
		<link>https://neptune.ai/blog/experiment-management</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 09:23:05 +0000</pubDate>
				<category><![CDATA[ML Model Development]]></category>
		<category><![CDATA[MLOps]]></category>
		<guid isPermaLink="false">https://neptune.test/experiment-management/</guid>

					<description><![CDATA[Machine learning or deep learning experiment tracking is a key factor in&#160;delivering successful outcomes. There’s no way you will succeed without it. Let me share a story that I’ve heard too many times. ”So I was developing a machine learning model with my team and within a few weeks of extensive experimentation, we&#160;got promising results…&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Machine learning or deep learning <a href="/blog/ml-experiment-tracking" target="_blank" rel="noreferrer noopener">experiment tracking</a> is a key factor in&nbsp;delivering successful outcomes. There’s no way you will succeed without it.</p>



<p>Let me share a story that I’ve heard too many times.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>”So I was developing a machine learning model with my team and within a few weeks of extensive experimentation, we&nbsp;<strong>got promising results</strong>…</em></p>



<p><em>…unfortunately, we couldn’t tell exactly what performed best because&nbsp;<strong>we didn’t track</strong>&nbsp;feature versions, didn’t record the parameters, and used different environments to run our models…</em></p>



<p><em>…after a few weeks,&nbsp;<strong>we weren’t even sure what we have actually tried</strong>&nbsp;so we needed to rerun pretty much everything”</em></p>
</blockquote>



<p>Sounds familiar?</p>



<p>In this article, I will show you how you can keep track of your machine learning experiments and organize your model development efforts so that stories like that will never happen to you.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-what-is-machine-learning-experiment-management">What is Machine Learning experiment management?</h2>



<p>Experiment management in the context of machine learning is a process of&nbsp;<strong>tracking experiment metadata</strong>&nbsp;like:</p>



<ul class="wp-block-list">
<li>code versions,</li>



<li>data versions,</li>



<li>hyperparameters,</li>



<li>environment,</li>



<li>metrics,</li>
</ul>



<p><strong>organizing them</strong>&nbsp;in a meaningful way and making them&nbsp;<strong>available to access and collaborate on</strong>&nbsp;within your organization.</p>



<p>In the next sections, you will see exactly what that means with examples and implementations.</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-how-to-keep-track-of-machine-learning-experimentation">How to keep track of Machine Learning experimentation</h2>



<p>What I mean by&nbsp;<strong>tracking is collecting all the metainformation</strong>&nbsp;about your machine learning experiments that is needed to:</p>



<ul class="wp-block-list">
<li>share your results and insights with the team (and you in the future),</li>



<li>reproduce results of the machine learning experiments,</li>



<li>keep your results, that take a long time to generate, safe.</li>
</ul>



<p>Let’s go through all the pieces of an experiment that I believe should be recorded, one by one.</p>



<h3 class="wp-block-heading" id="3">Code version control for data science</h3>



<p>Okay, in 2022 I think pretty much everyone working with code knows about version control. Failing to keep track of your code is a big (but obvious and easy-to-fix) oversight.</p>



<p>Should we just proceed to the next section? Not so fast.</p>



<h4 class="wp-block-heading">Problem 1: Jupyter notebook version control</h4>



<p>A large part of&nbsp;<strong>data science development is happening in Jupyter notebooks</strong>&nbsp;which are more than just code. Fortunately, there are tools that help with notebook versioning and diffing. Some tools that I know:</p>



<ul class="wp-block-list">
<li><a href="https://nbconvert.readthedocs.io/en/latest/" target="_blank" rel="noreferrer noopener nofollow">nbconvert</a> (.ipynb -&gt; .py conversion)</li>



<li><a href="https://github.com/jupyter/nbdime" target="_blank" rel="noreferrer noopener">nbdime</a>&nbsp;(diffing)</li>



<li><a href="https://github.com/mwouts/jupytext" target="_blank" rel="noreferrer noopener">jupytext</a>&nbsp;(conversion+versioning)</li>



<li><a href="https://docs-legacy.neptune.ai/integrations-and-supported-tools/ide-and-notebooks/jupyter-lab-and-jupyter-notebook" target="_blank" rel="noreferrer noopener">neptune-notebooks </a>(versioning+diffing+sharing)</li>
</ul>



<p>Once you have your notebook versioned, I would suggest going the extra mile and making sure that it runs top to bottom. For that you can use jupytext or nbconvert:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">jupyter nbconvert --to script train_model.ipynb;
python train_model.py
</pre>



<h4 class="wp-block-heading">Problem 2: Experiments on dirty commits</h4>



<p>Data science people tend to not follow the best practices of software development. You can always find someone (me included) who would ask:</p>



<p class="is-style-default"><em>“But how about tracking code in-between commits? What if someone runs an experiment without committing&nbsp;the code?”</em></p>



<p>One option is to explicitly forbid running code on dirty commits (commits that contain modified or untracked files). Another option is to give users an additional safety net and snapshot code whenever they run an experiment.</p>



<h3 class="wp-block-heading" id="4">Tracking hyperparameters</h3>



<p>Most decent machine learning models and pipelines have tuned non-default hyperparameters. Those could be learning rate, number of trees or a missing value imputation method. Failing to keep track of hyperparameters can result in weeks of wasted time looking for them or retraining models.</p>


    <a
        href="/blog/hyperparameter-tuning-in-python-complete-guide"
        id="cta-box-related-link-block_3ea6912f2c0132210107e8277b0b7af8"
        class="block-cta-box-related-link  l-margin__top--standard l-margin__bottom--standard"
        target="_blank" rel="nofollow noopener noreferrer"    >

    
    <div class="block-cta-box-related-link__description-wrapper block-cta-box-related-link__description-wrapper--full">

        
            <div class="c-eyebrow">

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-related--article.svg"
                    loading="lazy"
                    decoding="async"
                    width="16"
                    height="16"
                    alt=""
                    class="c-eyebrow__icon">

                <div class="c-eyebrow__text">
                    Related                </div>
            </div>

        
                    <h3 class="c-header" class="c-header" id="h-hyperparameter-tuning-in-python-a-complete-guide">                Hyperparameter Tuning in Python: a Complete Guide            </h3>        
                    <div class="c-button c-button--tertiary c-button--small">

                <span class="c-button__text">
                    Read more                </span>

                <img
                    src="https://neptune.ai/wp-content/themes/neptune/img/icon-button-arrow-right.svg"
                    loading="lazy"
                    decoding="async"
                    width="12"
                    height="12"
                    alt=""
                    class="c-button__arrow">

            </div>
            </div>

    </a>



<p>The good thing is,<strong>&nbsp;that keeping track of hyperparameters can be really simple</strong>. Let’s start with the way people tend to define them and then we’ll proceed to hyperparameter tracking:</p>



<h4 class="wp-block-heading">Config files</h4>



<p>Typically a&nbsp;<em>.yaml</em>&nbsp;file that contains all the information that your script needs to run. For example:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">data:
    train_path: <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/train.csv'</span>
    valid_path: <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/valid.csv'</span>

model:
    objective: <span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>
    metric: <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>
    learning_rate: <span class="hljs-number" style="color: teal;">0.1</span>
    num_boost_round: <span class="hljs-number" style="color: teal;">200</span>
    num_leaves: <span class="hljs-number" style="color: teal;">60</span>
    feature_fraction: <span class="hljs-number" style="color: teal;">0.2</span></pre>



<h4 class="wp-block-heading">Command line + argparse</h4>



<p>You simply pass your parameters to your script as arguments:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">python train_evaluate.py
    --train_path <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/train.csv'</span>
    --valid_path <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/valid.csv'</span>
    -- objective <span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>
    -- metric <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>
    -- learning_rate <span class="hljs-number" style="color: teal;">0.1</span>
    -- num_boost_round <span class="hljs-number" style="color: teal;">200</span>
    -- num_leaves <span class="hljs-number" style="color: teal;">60</span>
    -- feature_fraction <span class="hljs-number" style="color: teal;">0.2</span></pre>



<h4 class="wp-block-heading">Parameters dictionary in main.py</h4>



<p>You put all of your parameters in a dictionary inside your script:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">TRAIN_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/train.csv'</span>
VALID_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/valid.csv'</span>

PARAMS = {<span class="hljs-string" style="color: rgb(221, 17, 68);">'objective'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>,
          <span class="hljs-string" style="color: rgb(221, 17, 68);">'metric'</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>,
          <span class="hljs-string" style="color: rgb(221, 17, 68);">'learning_rate'</span>: <span class="hljs-number" style="color: teal;">0.1</span>,
          <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_boost_round'</span>: <span class="hljs-number" style="color: teal;">200</span>,
          <span class="hljs-string" style="color: rgb(221, 17, 68);">'num_leaves'</span>: <span class="hljs-number" style="color: teal;">60</span>,
          <span class="hljs-string" style="color: rgb(221, 17, 68);">'feature_fraction'</span>: <span class="hljs-number" style="color: teal;">0.2</span>}</pre>



<h4 class="wp-block-heading">Hydra</h4>



<p><a href="https://hydra.cc/" target="_blank" rel="noreferrer noopener nofollow">Hydra</a> is a configuration management framework developed by Facebook open Source.</p>



<p>The key ideas behind it are:</p>



<ul class="wp-block-list">
<li>Dynamically <strong>create</strong> a <strong>hierarchical</strong> <strong>configuration</strong> <strong>by</strong> <strong>composition</strong>,</li>



<li>Override it when needed through the command line,</li>



<li>Pass new parameters (not present in the config) via CLI – they will be handled for you</li>
</ul>



<p>Hydra gives you the ability to prepare and override complex configuration setups (including config groups and hierarchies), while keeping track of any overridden values.</p>



<p>To understand how it works, let us take a simple example of a config.yaml file:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">project: ORGANIZATION/home-credit
name: home-credit-default-risk
parameters:
<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Data preparation</span>
	n_cv_splits: <span class="hljs-number" style="color: teal;">5</span>
	validation_size: <span class="hljs-number" style="color: teal;">0.2</span>
	stratified_cv: <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">True</span>
	shuffle: <span class="hljs-number" style="color: teal;">1</span>
<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Random forest</span>
	rf__n_estimators: <span class="hljs-number" style="color: teal;">2000</span>
	rf__criterion: gini
	rf__max_depth: <span class="hljs-number" style="color: teal;">40</span>
	rf__class_weight: balanced</pre>



<p>This configuration can be used in an application by simply calling the hydra decorator:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> hydra
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> omegaconf <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> DictConfig
<span class="hljs-meta" style="font-weight: 700; color: rgb(153, 153, 153);">@hydra.main(config_path='config.yaml')</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">def</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: 700;">train</span><span class="hljs-params">(cfg)</span>:</span>
	print(cfg.pretty())  <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># this prints config in a reader friendly way</span>
	print(cfg.parameters.rf__n_estimators)  <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># this is how to access single value from the config</span>
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">if</span> __name__ == <span class="hljs-string" style="color: rgb(221, 17, 68);">"__main__"</span>:
	train()</pre>



<p>Running the above script will produce the below output:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">name: home-credit-default-risk
parameters:
	n_cv_splits: <span class="hljs-number" style="color: teal;">5</span>
	rf__class_weight: balanced
	rf__criterion: gini
	rf__max_depth: <span class="hljs-number" style="color: teal;">40</span>
	rf__n_estimators: <span class="hljs-number" style="color: teal;">2000</span>
	shuffle: <span class="hljs-number" style="color: teal;">1</span>
	stratified_cv: true
	validation_size: <span class="hljs-number" style="color: teal;">0.2</span>
project: ORGANIZATION/home-credit
<span class="hljs-number" style="color: teal;">2000</span>
</pre>



<p>To override existing parameters or add new parameters, simply pass them as CLI arguments:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">python hydra-main.py parameters.rf__n_estimators=<span class="hljs-number" style="color: teal;">1500</span> parameters.rf__max_features=<span class="hljs-number" style="color: teal;">0.2</span>
</pre>



<p><em><strong>Note:</strong> Strict mode has to be turned off to add new parameters:</em></p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-meta" style="font-weight: 700; color: rgb(153, 153, 153);">@hydra.main(config_path='config.yaml', strict=False)</span>
</pre>



<p>One drawback of Hydra is that to share the configuration or track it across experiments, you have to manually save the config.yaml file.</p>



<p>Hydra is in active development, be sure to check their <a href="https://hydra.cc/docs/intro/">latest docs</a>.</p>



<h4 class="wp-block-heading">Magic numbers all over the place</h4>



<p>Whenever you need to pass a parameter you simply pass a value of that parameter.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">...
train = pd.read_csv(<span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/train.csv'</span>)

model = Model(objective=<span class="hljs-string" style="color: rgb(221, 17, 68);">'binary'</span>,
              metric=<span class="hljs-string" style="color: rgb(221, 17, 68);">'auc'</span>,
              learning_rate=<span class="hljs-number" style="color: teal;">0.1</span>,
              num_boost_round=<span class="hljs-number" style="color: teal;">200</span>,
              num_leaves=<span class="hljs-number" style="color: teal;">60</span>,
              feature_fraction=<span class="hljs-number" style="color: teal;">0.2</span>)
model.fit(train)

valid = pd.read_csv(<span class="hljs-string" style="color: rgb(221, 17, 68);">'/path/to/my/valid.csv'</span>)
model.evaluate(valid)</pre>



<p>We all do that sometimes but it is not a great idea especially if someone will need to take over your work.</p>



<p>Ok, so I do like&nbsp;<em>.yaml</em>&nbsp;configs and passing arguments from the command line (option 1 and 2), but anything other than magic numbers is fine. What is important is that you&nbsp;<strong>log those parameters for every experiment</strong>.</p>



<p>If you decide to pass all parameters as the script arguments&nbsp;<strong>make sure to log them somewhere</strong>. It is easy to forget, so using an experiment management tool that does this automatically can save you here.&nbsp;</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">parser = argparse.ArgumentParser()
parser.add_argument(<span class="hljs-string" style="color: rgb(221, 17, 68);">'--number_trees'</span>)
parser.add_argument(<span class="hljs-string" style="color: rgb(221, 17, 68);">'--learning_rate'</span>)
args = parser.parse_args()

experiment_manager.create_experiment(params=vars(args))
...
<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># experiment logic</span>
...</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/params.png?ssl=1" alt="tracking hyperparameters"/></figure>
</div>


<p>There is&nbsp;<strong>nothing so painful</strong>&nbsp;<strong>as to</strong>&nbsp;have a perfect script on a perfect data version producing perfect metrics only to&nbsp;<strong>discover that you don’t remember what are the hyperparameters</strong>&nbsp;that were passed as arguments.</p>



<h4 class="wp-block-heading"><strong>neptune.ai</strong></h4>



<p>Neptune makes it very easy to keep track of hyperparameters across runs by giving various options:</p>



<ul class="wp-block-list">
<li>Log hyperparameters individually:</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/epoch_nr"</span>] = <span class="hljs-number" style="color: teal;">5</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/batch_size"</span>] = <span class="hljs-number" style="color: teal;">32</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/dense"</span>] = <span class="hljs-number" style="color: teal;">512</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/optimizer"</span>] = <span class="hljs-string" style="color: rgb(221, 17, 68);">"sgd"</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/metrics"</span>] = [<span class="hljs-string" style="color: rgb(221, 17, 68);">"accuracy"</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">"mae"</span>]
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters/activation"</span>] = <span class="hljs-string" style="color: rgb(221, 17, 68);">"relu"</span>  </pre>



<ul class="wp-block-list">
<li>Log all of them together as a dictionary:</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Define parameters</span>
params = {
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"epoch_nr"</span>: <span class="hljs-number" style="color: teal;">5</span>,
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"batch_size"</span>: <span class="hljs-number" style="color: teal;">32</span>,
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"dense"</span>: <span class="hljs-number" style="color: teal;">512</span>,
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"optimizer"</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">"sgd"</span>,
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"metrics"</span>: [<span class="hljs-string" style="color: rgb(221, 17, 68);">"accuracy"</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">"binary_accuracy"</span>],
	<span class="hljs-string" style="color: rgb(221, 17, 68);">"activation"</span>: <span class="hljs-string" style="color: rgb(221, 17, 68);">"relu"</span>,
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Pass parameters</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"parameters"</span>] = params
</pre>



<p>In both the above cases, the parameters are logged under the <em><a href="https://docs-legacy.neptune.ai/logging/">All Metadata </a></em><a href="https://docs.neptune.ai/logging/">section</a> of the <em>run </em>UI.</p>



<ul class="wp-block-list">
<li>You can also <a href="https://docs-legacy.neptune.ai/you-should-know/what-can-you-log-and-display#files" target="_blank" rel="noreferrer noopener nofollow">upload configuration files</a> (like the config.yaml file used for Hydra) directly:</li>
</ul>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"config_file"</span>].upload(<span class="hljs-string" style="color: rgb(221, 17, 68);">"config.yaml"</span>)
</pre>



<p>This file will be logged under the <a href="https://docs-legacy.neptune.ai/logging/"><em>All Metadata </em>section</a> of the <em>run </em>UI.</p>



<h3 class="wp-block-heading" id="5">Data versioning</h3>



<p>In real-life projects, data is changing over time. Some typical situations include:</p>



<ul class="wp-block-list">
<li>new images are added,</li>



<li>labels are improved,</li>



<li>mislabeled/wrong data is removed,</li>



<li>new data tables are discovered,</li>



<li>new features are engineered and processed,</li>



<li>validation and testing datasets change to reflect the production environment.</li>
</ul>



<p>Whenever your&nbsp;<strong>data changes</strong>, the output of your analysis, report or&nbsp;<strong>experiment results will likely change</strong>&nbsp;even though the code and environment did not. That is why to make sure you are comparing apples to apples you need to&nbsp;<strong>keep track of your data versions</strong>.</p>



<p><strong>Having almost everything versioned</strong>&nbsp;and getting different results can be extremely frustrating, and&nbsp;<strong>can mean a lot of time (and money) in wasted effort</strong>. The sad part is that you can do little about it afterward. So again, keep your experiment data versioned.</p>



<p>For the vast majority of use cases whenever new data comes in you can&nbsp;<strong>save it in a new location and log this location and a hash</strong>&nbsp;of the data. Even if the data is very large, for example when dealing with images, you can create a smaller metadata file with image paths and labels and track changes of that file.</p>



<p>A wise man once told me:</p>



<blockquote class="wp-block-quote is-style-default is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“Storage is cheap, training a model for 2 weeks on an 8-GPU node is not.”</em></p>
</blockquote>



<p>And if you think about it, logging this information doesn’t have to be rocket science.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">exp.set_property(<span class="hljs-string" style="color: rgb(221, 17, 68);">'data_path'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'DATASET_PATH'</span>)
exp.set_property(<span class="hljs-string" style="color: rgb(221, 17, 68);">'data_version'</span>, md5_hash(<span class="hljs-string" style="color: rgb(221, 17, 68);">'DATASET_PATH'</span>))</pre>



<p>You can calculate hash yourself, use a simple&nbsp;<a href="https://neptune-contrib.readthedocs.io/examples/data_versioning.html" target="_blank" rel="noreferrer noopener">data versioning extension</a>&nbsp;or outsource hashing to a full-blown data versioning tool like&nbsp;<a href="https://dvc.org/" target="_blank" rel="noreferrer noopener nofollow">DVC</a>.</p>



<p>You can calculate and log the hash yourself, or use a full-fledged data versioning tool that gives you greater versioning capabilities. Read more about some of the best tools available in the market below.</p>



<section id="blog-intext-cta-block_98c41fd29f2f6d08a2c75d09d79e1a2f" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-see-also">See also </h3>
    
            <p>  <a href="/blog/best-data-version-control-tools" target="_blank" rel="noreferrer noopener">Best 7 Data Version Control Tools </a></p>
    
    </section>



<p>Whichever option you decide is best for your project&nbsp;<strong>please version your data</strong>.</p>



<h3 class="wp-block-heading" id="6">Tracking model performance metrics</h3>



<p>I have never found myself in a situation where I thought that I have logged too many metrics for my experiment, have you?</p>



<p><strong>In a real-world project, the metrics you care about can change</strong>&nbsp;due to new discoveries or changing specifications so logging more metrics can actually save you some time and trouble in the future.</p>



<p>Either way, my suggestion is:</p>



<blockquote class="wp-block-quote is-style-default is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“Log metrics, log them all”</em></p>
</blockquote>



<p>Typically, metrics are as simple as a single number</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">exp.send_metric(<span class="hljs-string" style="color: rgb(221, 17, 68);">'train_auc'</span>, train_auc)
exp.send_metric(<span class="hljs-string" style="color: rgb(221, 17, 68);">'valid_auc'</span>, valid_auc)</pre>



<p>but I like to think of it as something a bit broader. To understand if your model has improved, you may want to take a look at a chart, confusion matrix or distribution of predictions. Those, in my view, are still metrics because they help you measure the performance of your experiment.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">exp.send_image(<span class="hljs-string" style="color: rgb(221, 17, 68);">'diagnostics'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'confusion_matrix.png'</span>)
exp.send_image(<span class="hljs-string" style="color: rgb(221, 17, 68);">'diagnostics'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'roc_auc.png'</span>)
exp.send_image(<span class="hljs-string" style="color: rgb(221, 17, 68);">'diagnostics'</span>, <span class="hljs-string" style="color: rgb(221, 17, 68);">'prediction_dist.png'</span>)</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/charts.gif?ssl=1" alt="diagnostic charts"/></figure>
</div>


<section id="note-block_494756f5937655be2a024f4ec10c1d63"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-note__header">
            Note:        </h3>
    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <p>Tracking metrics<strong> both on training and validation</strong> datasets can help you assess the risk of the model not performing well in production. The smaller the gap the lower the risk. A great resource is this kaggle days talk by Jean-François Puget.</p>
                                    </div>

            </div>
                    <div class="c-item c-item--video">

                                    <img
                        alt=""
                        class="c-item__arrow"
                        src="https://neptune.ai/wp-content/themes/neptune/img/blocks/note/list-arrow.svg"
                        loading="lazy"
                        decoding="async"
                        width="12"
                        height="10"
                    />
                
                <div class="c-item__content">

                                            <iframe loading="lazy" title="Beyond Feature Engineering and HPO | by Jean-François Puget | Kaggle Days Paris" width="640" height="360" src="https://www.youtube.com/embed/VC8Jc9_lNoY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>                                    </div>

            </div>
            </div>


</section>



<p>Moreover, if you are working with data collected at different timestamps you can assess model performance decay and&nbsp;<strong>suggest a proper model retraining schema</strong>. Simply track metrics at different timeframes of your validation data and see how the performance drops.</p>



<section id="blog-intext-cta-block_e9e35fb99be3520482f7354605984a5f" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-dig-deeper">Dig deeper</h3>
    
            <p><a href="/blog/performance-metrics-in-machine-learning-complete-guide" target="_blank" rel="noopener">Read the article: Performance Metrics in Machine Learning [Complete Guide]</a></p>
    
    </section>



<h3 class="wp-block-heading" id="7">Versioning experiment environment</h3>



<p>The majority of problems with environment versioning can be summarized by the infamous quote:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“I don’t understand, it worked on my machine.”</em></p>
</blockquote>



<p>One approach that helps solve this issue can be called&nbsp;<strong><em>“environment as code”</em></strong>&nbsp;where the environment can be created by executing instructions (<em>bash/yaml/docker</em>) step-by-step. By embracing this approach you can<strong>&nbsp;switch from versioning the environment to versioning environment set-up code</strong>&nbsp;which we know how to do.</p>



<p>There are a few options that I know to be used in practice (by no means this is a full list of approaches).</p>



<h4 class="wp-block-heading">Docker images</h4>



<p>This is the preferred option and there are a lot of resources on the subject. One that I particularly like is the<a href="https://towardsdatascience.com/learn-enough-docker-to-be-useful-b7ba70caeb4b" target="_blank" rel="noreferrer noopener">&nbsp;“Learn Enough Docker to be useful” series</a>&nbsp;by Jeff Hale. In a nutshell, you define the Dockerfile with some instructions.</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Use a miniconda3 as base image</span>
FROM continuumio/miniconda3

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Installation of jupyterlab</span>
RUN pip install jupyterlab==<span class="hljs-number" style="color: teal;">0.35</span><span class="hljs-number" style="color: teal;">.6</span> &amp;&amp;
pip install jupyterlab-server==<span class="hljs-number" style="color: teal;">0.2</span><span class="hljs-number" style="color: teal;">.0</span> &amp;&amp;
conda install -c conda-forge nodejs

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Installation of Neptune and enabling neptune extension</span>
RUN pip install neptune &amp;&amp;
pip install neptune-notebooks &amp;&amp;
jupyter labextension install neptune-notebooks

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Setting up Neptune API token as env variable</span>
ARG NEPTUNE_API_TOKEN
ENV NEPTUNE_API_TOKEN=$NEPTUNE_API_TOKEN

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Adding current directory to container</span>
ADD . /mnt/workdir
WORKDIR /mnt/workdir</pre>



<p>You build your environment from those instructions:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">docker build -t jupyterlab
    --build-arg NEPTUNE_API_TOKEN=$NEPTUNE_API_TOKEN .</pre>



<p>And you can run scripts on the environment by going:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">docker run
    -p <span class="hljs-number" style="color: teal;">8888</span>:<span class="hljs-number" style="color: teal;">8888</span>
    jupyterlab:latest
    /opt/conda/bin/jupyter lab
    --allow-root
    --ip=<span class="hljs-number" style="color: teal;">0.0</span><span class="hljs-number" style="color: teal;">.0</span><span class="hljs-number" style="color: teal;">.0</span>
    --port=<span class="hljs-number" style="color: teal;">8888</span></pre>



<h4 class="wp-block-heading">Conda Environments</h4>



<p>It’s a simpler option and in many cases, it is enough to manage your environments with no problems. It doesn’t give you as many options or guarantees as docker does, but it can be enough for your use case.The environment can be defined as a<em>&nbsp;.yaml</em>&nbsp;configuration file just like this one:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">name: salt

dependencies:
   - pip=<span class="hljs-number" style="color: teal;">19.1</span><span class="hljs-number" style="color: teal;">.1</span>
   - python=<span class="hljs-number" style="color: teal;">3.6</span><span class="hljs-number" style="color: teal;">.8</span>
   - psutil
   - matplotlib
   - scikit-image

- pip:
   - neptune-client==<span class="hljs-number" style="color: teal;">0.3</span><span class="hljs-number" style="color: teal;">.0</span>
   - neptune-contrib==<span class="hljs-number" style="color: teal;">0.9</span><span class="hljs-number" style="color: teal;">.2</span>
   - imgaug==<span class="hljs-number" style="color: teal;">0.2</span><span class="hljs-number" style="color: teal;">.5</span>
   - opencv_python==<span class="hljs-number" style="color: teal;">3.4</span><span class="hljs-number" style="color: teal;">.0</span><span class="hljs-number" style="color: teal;">.12</span>
   - torch==<span class="hljs-number" style="color: teal;">0.3</span><span class="hljs-number" style="color: teal;">.1</span>
   - torchvision==<span class="hljs-number" style="color: teal;">0.2</span><span class="hljs-number" style="color: teal;">.0</span>
   - pretrainedmodels==<span class="hljs-number" style="color: teal;">0.7</span><span class="hljs-number" style="color: teal;">.0</span>
   - pandas==<span class="hljs-number" style="color: teal;">0.24</span><span class="hljs-number" style="color: teal;">.2</span>
   - numpy==<span class="hljs-number" style="color: teal;">1.16</span><span class="hljs-number" style="color: teal;">.4</span>
   - cython==<span class="hljs-number" style="color: teal;">0.28</span><span class="hljs-number" style="color: teal;">.2</span>
   - pycocotools==<span class="hljs-number" style="color: teal;">2.0</span><span class="hljs-number" style="color: teal;">.0</span></pre>



<p>You can create conda environment by running:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">conda env create -f environment.yaml
</pre>



<p>What is pretty cool is that you can always dump the state of your environment to such config by running:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">conda env export &gt; environment.yaml
</pre>



<p>Simple and gets the job done.</p>



<div id="separator-block_64483aacb5659ccf450be25c122d8a48"
         class="block-separator block-separator--5">
</div>



<h4 class="wp-block-heading">Makefile</h4>



<p>You can always define all your bash instructions explicitly in the Makefile. For example:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">git clone git@github.com:neptune-ml/open-solution-mapping-challenge.git
cd open-solution-mapping-challenge

pip install -r requirements.txt

mkdir data
cd data
curl <span class="hljs-number" style="color: teal;">-0</span> https://www.kaggle.com/c/imagenet-object-localization-challenge/data/LOC_synset_mapping.txt</pre>



<p>and set it up by running:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">source Makefile
</pre>



<p>It is often difficult to read those files and you are giving up a ton of additional features of conda and/or docker but it doesn’t get much simpler than this.</p>



<p>Now, that you have your environment defined as code, make sure to&nbsp;<strong>log the environment file for every experiment</strong>.</p>



<p>Again, if you are using an experiment manager you can snapshot your code whenever you create a new experiment, even if you forget to git commit:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">experiment_manager.create_experiment(upload_source_files=[<span class="hljs-string" style="color: rgb(221, 17, 68);">'environment.yml'</span>)
...
<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># machine learning magic</span>
...</pre>



<p>and have it safely stored in the app:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/env_versioning.png?ssl=1" alt="environment versioning"/></figure>
</div>


<h3 class="wp-block-heading" id="8">Versioning Machine Learning models</h3>



<p>You have now trained a model using its optimal hyperparameters and have logged and versioned the data, hyperparameters, and the environment. But what about the model itself? In most cases, training and inference happen in different places (scripts/notebooks), and you need to be able to make the model you’ve trained available for inference somewhere else.</p>



<p>There are two basic ways to do this:</p>



<h4 class="wp-block-heading">1. Save the model as a binary file</h4>



<p>You can export the model as a binary file and load it from the binary file wherever you need to make inferences.&nbsp;</p>



<p>There are multiple ways you can do this &#8211; libraries like <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#saving-loading-model-for-inference" target="_blank" rel="noreferrer noopener nofollow">PyTorch</a> and <a href="https://www.tensorflow.org/guide/keras/save_and_serialize" target="_blank" rel="noreferrer noopener nofollow">Keras</a> have their own save and load methods, while outside of deep-learning <a href="https://docs.python.org/3/library/pickle.html" target="_blank" rel="noreferrer noopener nofollow">Pickle</a> remains the most popular way to save and load a model from a file:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> pickle

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># To save a model</span>
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">with</span> open(“saved_model.pkl”, “wb”) <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> f:
	pickle.dumps(trained_model, f)

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># To load a model</span>
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">with</span> open(“saved_model.pkl”, “rb”) <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> f:
	model = pickle.load(f)
</pre>



<p>Since the model is saved as a file, you can use file versioning tools like git, or upload the file to experiment trackers like Neptune:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">run[“trained_model”].upload(“saved_model.pkl”)
</pre>



<h4 class="wp-block-heading">2. Use a model registry</h4>



<p>A model registry is a central repository for publishing and accessing models. It is a place where ML developers can push their models to be used by other stakeholders or themselves at a later point in time.</p>



<section id="blog-intext-cta-block_949d305a9b8092d502e0686ae516dc5e" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-learn-more">Learn more</h3>
    
            <p><a href="/blog/ml-model-registry" target="_blank" rel="noopener">ML Model Registry: What It Is, Why It Matters, How to Implement It</a></p>
    
    </section>



<p>Some popular model registries available currently are:</p>



<h4 class="wp-block-heading">MLflow</h4>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/Model-registry-mlflow.png?ssl=1" alt="model registry mlflow " class="wp-image-69316"/><figcaption class="wp-element-caption"><em><a href="https://www.mlflow.org/docs/latest/model-registry.html#using-the-model-registry" target="_blank" rel="noreferrer noopener nofollow">Source</a></em></figcaption></figure>
</div>


<p>The MLflow Model Registry is one of the few open-source model registries available in the market today. You can decide to manage this on your infrastructure or use <a href="https://www.databricks.com/" target="_blank" rel="noreferrer noopener nofollow">a fully-managed implementation</a> on a platform like Databricks, or in integrated environments like Amazon SageMaker and Azure Machine Learning, where MLflow is supported via the MLflow client.</p>



<p>In both <a href="https://aws.amazon.com/sagemaker/" target="_blank" rel="noreferrer noopener nofollow">SageMaker</a> and <a href="https://azure.microsoft.com/en-us/products/machine-learning" target="_blank" rel="noreferrer noopener nofollow">Azure ML</a>, you can log models using MLflow APIs and manage them through the platform&#8217;s proprietary infrastructure. These integrations provide compatibility with the MLflow client, making it easy to work across teams with services within AWS and Azure platforms. On the other hand, keep in mind that some open-source MLflow features may be unavailable or deprecated to favor in-house solutions.</p>



<p>MLflow provides:&nbsp;</p>



<ul class="wp-block-list">
<li><strong>Annotation and description tools</strong> for tagging models, providing documentation and model information such as the date the model was registered, modification history of the registered model, the model owner, stage, version, and so on;</li>



<li><strong>Model versioning</strong> to automatically keep track of versions for registered models when updated;</li>



<li><strong>API integration</strong> to serve machine learning models as RESTful APIs for online testing, dashboard updates, etc;</li>



<li><strong>CI/CD workflow integration</strong> to record stage transitions, request, review, and approve changes as part of CI/CD pipelines for better control and governance;</li>



<li><strong>Model stages</strong> (e.g., “Staging”, “Production”) <strong>&nbsp;</strong>to assign preset or custom stages to each model version, like “Staging” and “Production” to represent the lifecycle of a model;</li>



<li><strong>Promotion schemes</strong> to easily transition models across different lifecycle stages.</li>
</ul>



<p></p>



<h4 class="wp-block-heading">neptune.ai</h4>



<p>Neptune is primarily an experiment tracker, but it provides <a href="https://docs-legacy.neptune.ai/model_registry/">model registry functionality</a> to a great extent. You can log, store, and organize your model metadata to have your production-ready models at hand.</p>



<div id="app-screenshot-block_c8ccd4d1e02063fc5fd5055aa2119150"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/08/Models-as-runs.jpg?fit=1020%2C454&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/08/Models-as-runs.jpg?fit=480%2C214&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/08/Models-as-runs.jpg?fit=768%2C342&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2022/08/Models-as-runs.jpg?fit=1020%2C454&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="454"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				A list of different model versions and associated metadata tracked in neptune.ai			</figcaption>
			
</div>



<div id="separator-block_35eaf513b49bc41a175031b7ecbf91cf"
         class="block-separator block-separator--15">
</div>



<p>Neptune lets you:</p>



<ul class="wp-block-list">
<li><a href="https://docs-legacy.neptune.ai/model_registry/">Track models and model versions</a>, along with the associated metadata. You can version model code, images, datasets, Git info, and notebooks.</li>



<li>Filter and sort the versioned data easily.</li>



<li>Manage model stages using tags.</li>



<li><a href="https://docs-legacy.neptune.ai/how-to-guides/model-registry/querying-and-downloading-models-and-metadata" target="_blank" rel="noreferrer noopener">Query and download any stored model files</a> and metadata.</li>



<li>And it <a href="/product/team-collaboration">helps your team to collaborate</a> on experiments by providing persistent links to the UI.</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-how-to-organize-your-model-development-process">How to organize your model development process?</h2>



<p>As much as I think tracking experimentation and ensuring the reproducibility of your work is important it is just a part of the puzzle. Once you have tracked hundreds of experiment runs you will quickly face new problems:</p>



<ul class="wp-block-list">
<li>how to search through and visualize all of those experiments,</li>



<li>how to organize them into something that you and your colleagues can digest,</li>



<li>how to make this data shareable and accessible inside your team/organization?</li>
</ul>



<p>This is where experiment management tools really come in handy. They let you:</p>



<ul class="wp-block-list">
<li>filter/sort/tag/group experiments,</li>



<li>visualize/compare experiment runs,</li>



<li>share (app and programmatic query API) experiment results and metadata.</li>
</ul>



<p>For example, by sending a persistent URL, I can share a&nbsp;comparison of machine learning experiments&nbsp;with all the additional information available.</p>



<div id="app-screenshot-block_0a399257ad2e69352631d4779400e304"
	class="block-app-screenshot js-block-with-image-full-screen-modal "
	data-video-url=""
	data-show-controls="false"
	data-unmute="false"
	data-button-icon="https://neptune.ai/wp-content/themes/neptune/img/icon-close.svg"
	data-image-full-screen-modal="https://i0.wp.com/neptune.ai/wp-content/uploads/2023/08/Side-by-side-comparison-.jpg?fit=1020%2C565&#038;ssl=1"
>

			<div class="block-app-screenshot__image-wrapper">
			<div class="block-app-screenshot__bar">
				<figure class="block-app-screenshot__bar-buttons-wrapper">
					<img
						src="https://neptune.ai/wp-content/themes/neptune/img/blocks/app-screenshot/bar-buttons.svg"
						width="34"
						height="9"
						class="block-app-screenshot__bar-buttons"
						alt="">
				</figure>
			</div>

			
				<img
					srcset="
					https://i0.wp.com/neptune.ai/wp-content/uploads/2023/08/Side-by-side-comparison-.jpg?fit=480%2C266&#038;ssl=1 480w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2023/08/Side-by-side-comparison-.jpg?fit=768%2C425&#038;ssl=1 768w,					https://i0.wp.com/neptune.ai/wp-content/uploads/2023/08/Side-by-side-comparison-.jpg?fit=1020%2C565&#038;ssl=1 1020w"
					alt=""
					style=""
					width="1020"
					height="565"
					class="block-app-screenshot__image"
				>

			
			<div class="block-app-screenshot__overlay">

				
					<a
						href="https://demo.neptune.ai/o/neptune/org/LLM-training-example/runs/compare?viewId=9c57c497-1131-4644-827f-0fcff4f28ad2&#038;dash=leaderboard&#038;compare=IwGl7SOrYhmOSYwCwCYSIJyQKy4zyHKmiaipnUqx54gVhV5VXlO1ewDsNpTTA2Co%2B3WpiaJQ0gY2ToS4-stUAGYSq2qk2bIjwR0DKgDZE6ABxhrEXGLCZ7YeKbOVLQA"
						class="c-button c-button--primary c-button--small c-button--cta">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-button--test-tube.svg"
							width="16"
							height="19"
							target="_blank" rel="nofollow noopener noreferrer"							class="c-button__icon"
							alt=""
						/>

													<span class="c-button__text">
								See in app							</span>
						
					</a>

				
														<button
						class="js-c-image-full-screen-modal c-button c-button--tertiary c-button--small">
						<img
							decoding="async"
							loading="lazy"
							src="https://neptune.ai/wp-content/themes/neptune/img/icon-zoom.svg"
							width="16"
							height="17"
							class="c-button__icon"
							alt="zoom"
						/>

						<span class="c-button__text">
							Full screen preview						</span>
						
					</button>
									
			</div>

		</div>

					<figcaption class="block-app-screenshot__caption">
				Side-by-side experiment comparison in the Neptune web app			</figcaption>
			
</div>



<div id="separator-block_35eaf513b49bc41a175031b7ecbf91cf"
         class="block-separator block-separator--15">
</div>



<p>With that, you and all the people on your team know exactly what is happening when it comes to model development. It makes it easy to track the progress, discuss problems, and discover new improvement ideas.&nbsp;&nbsp;</p>



<h3 class="wp-block-heading" id="10">Working in creative iterations</h3>



<p>Tools like that are a big help and a huge improvement from spreadsheets and notes. However, what I believe can take your machine learning projects to the next level is a focused experimentation methodology that I call creative iterations.</p>



<section id="blog-intext-cta-block_dc1bffd7f5dc06a9843b328c5a730d08" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-check-also">Check also</h3>
    
            <p><strong> </strong> <a href="/blog/best-tools-to-manage-machine-learning-projects" target="_blank" rel="noreferrer noopener">Best Tools to Manage Machine Learning Projects</a><br />
  <a href="/blog/data-science-project-management" target="_blank" rel="noreferrer noopener">Data Science Project Management</a></p>
    
    </section>



<p>I’d like to start with some pseudocode and explain it later:</p>



<pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">time, budget, business_goal = business_specification()

creative_idea = initial_research(business_goal)

<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">while</span> time <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">and</span> budget <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">and</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">not</span> business_goal:
   solution = develop(creative_idea)
   metrics = evaluate(solution, validation_data)
   <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">if</span> metrics &gt; best_metrics:
      best_metrics = metrics
      best_solution = solution
   creative_idea = explore_results(best_solution)

   time.update()
   budget.update()</pre>



<p>In every project, there is a phase where the&nbsp;<strong>business_specification</strong>&nbsp;is created that usually entails a&nbsp;<strong>timeframe, budget, and goal</strong>&nbsp;of the machine learning project. When I say goal, I mean a set of KPIs, business metrics, or if you are super lucky, machine learning metrics. At this stage, it is very important to manage business expectations but it’s a story for another day. If you are interested in those things I suggest you take a look at some articles by Cassie Kozyrkov, for instance,&nbsp;<a href="https://medium.com/hackernoon/ai-reality-checklist-be34e2fdab9" target="_blank" rel="noreferrer noopener">this one</a>.</p>



<p>Assuming that you and your team know what is the business goal you can do&nbsp;<strong>initial_research</strong>&nbsp;and cook up a baseline approach, a first&nbsp;<strong>creative_idea</strong>. Then you&nbsp;<strong>develop</strong>&nbsp;it and come up with a&nbsp;<strong>solution</strong>&nbsp;which you need to&nbsp;<strong>evaluate</strong>&nbsp;and get your first set of&nbsp;<strong>metrics</strong>. Those, as mentioned before, don’t have to be simple numbers (and often are not) but could be charts, reports or user study results. Now you should study your&nbsp;<strong>solution, metrics, and explore_results</strong>.</p>



<p>It may be here where your project will end because:</p>



<ul class="wp-block-list">
<li>your first solution&nbsp;<strong>is good enough</strong>&nbsp;to satisfy business needs,</li>



<li>you can reasonably expect that there is&nbsp;<strong>no way to reach business goals</strong>&nbsp;within the previously assumed time and budget,</li>



<li>you discover that there is a<strong>&nbsp;low-hanging fruit problem somewhere close</strong>&nbsp;and your team should focus their efforts there.</li>
</ul>



<p>If none of the above apply, you list all the underperforming parts of your&nbsp;<strong>solution</strong>&nbsp;and figure out which ones could be improved and what&nbsp;<strong>creative_ideas</strong>&nbsp;can get you there. Once you have that list, you need to prioritize them based on expected&nbsp;<strong>goal</strong>&nbsp;improvements and&nbsp;<strong>budget</strong>. If you are wondering how can you estimate those improvements, the answer is simple:&nbsp;<strong>results exploration</strong>.</p>



<p>You have probably noticed that results exploration comes up a lot. That’s because it is so very important that it deserves its own section.</p>



<section id="blog-intext-cta-block_271f5c5d4f5a0709f61c5610c8804178" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-you-may-also-like">You may also like</h3>
    
            <p>  <a href="/blog/evaluation-metrics-binary-classification" target="_blank" rel="noreferrer noopener">24 Evaluation Metrics for Binary Classification (And When to Use Them)</a></p>
    
    </section>



<h3 class="wp-block-heading" id="11">Model results exploration</h3>



<p>This is an extremely important part of the process. You need to&nbsp;<strong>understand thoroughly where the current approach fails</strong>, how far time/budget wise are you from your goal, what are the risks associated with using your approach in production. In reality, this part is far from easy but mastering it is extremely valuable because:</p>



<ul class="wp-block-list">
<li>it leads to business problem understanding,</li>



<li>it leads to focusing on the problems that matter and saves a lot of time and effort for the team and organization,</li>



<li>it leads to discovering new business insights and project ideas.</li>
</ul>



<p><strong>Some popular model interpretation tools currently used are:</strong></p>



<ul class="wp-block-list">
<li><a href="https://shap.readthedocs.io/en/latest/index.html" target="_blank" rel="noreferrer noopener nofollow">SHAP</a>:</li>
</ul>



<p><strong><a href="/blog/shap-values" target="_blank" rel="noreferrer noopener">SHAP (SHapley Additive exPlanations)</a></strong> is a game theoretic approach to explain the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/SHAP-experiment-management.png?ssl=1" alt="SHAP experiment management" class="wp-image-68204" style="width:767px;height:421px"/></figure>
</div>


<p>Read how to use SHAP in their <a href="https://shap.readthedocs.io/en/latest/index.html" target="_blank" rel="noreferrer noopener nofollow">docs</a>.</p>



<ul class="wp-block-list">
<li><a href="https://github.com/marcotcr/lime" target="_blank" rel="noreferrer noopener nofollow">LIME</a></li>
</ul>



<p>Local interpretable model-agnostic explanations (LIME) is a paper in which the authors propose a concrete implementation of local surrogate models. Surrogate models are trained to approximate the predictions of the underlying black box model. Instead of training a global surrogate model, LIME focuses on training local surrogate models to explain individual predictions. The current <a href="https://github.com/marcotcr/lime" target="_blank" rel="noreferrer noopener nofollow">Python implementation</a> supports tabular, text, and image classifiers.</p>



<ul class="wp-block-list">
<li><a href="https://pypi.org/project/treeinterpreter/" target="_blank" rel="noreferrer noopener nofollow">treeinterpreter</a></li>
</ul>



<p>This is a package for interpreting scikit-learn’s decision tree and random forest predictions. Allows decomposing each prediction into bias and feature contribution components. Learn usage <a href="https://blog.datadive.net/random-forest-interpretation-with-scikit-learn/" target="_blank" rel="noreferrer noopener nofollow">here</a>.</p>



<p><strong>Some good resources I found on the subject are:</strong></p>



<ul class="wp-block-list">
<li>“Understanding and diagnosing your machine-learning models” PyData talk by Gael Varoquaux</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Understanding and diagnosing your machine-learning models - Gaël Varoquaux" width="500" height="281" src="https://www.youtube.com/embed/kbj3llSbaVA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<ul class="wp-block-list">
<li>“Creating correct and capable classifiers” PyData talk by Ian Osvald</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Creating correct and capable classifiers - Ian Ozsvald" width="500" height="281" src="https://www.youtube.com/embed/DkLPYccEJ8Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<ul class="wp-block-list">
<li><a href="https://towardsdatascience.com/using-what-if-tool-to-investigate-machine-learning-models-913c7d4118f" target="_blank" rel="noreferrer noopener">Using the ‘What-If Tool’ to investigate Machine Learning models</a>&nbsp;article by Parul Pandey</li>
</ul>



<p>Diving deeply into results exploration is a story for another day and another blog post, but the key takeaway is that investing your time in&nbsp;<strong>understanding your current solution can be extremely beneficial</strong>&nbsp;for your business.</p>



<ul class="wp-block-list">
<li><a href="https://christophm.github.io/interpretable-ml-book/">Interpretable Machine Learning</a> book by Christoph Molnar</li>



<li><a href="https://neptune.ai/blog/ml-model-interpretation-tools">ML Model Interpretation Tools</a> blog by Abhishek Jha</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-final-thoughts">Final thoughts</h2>



<p>In this article, I explained:</p>



<ul class="wp-block-list">
<li>what experiment management is,</li>



<li>how organizing your model development process improves your workflow.</li>
</ul>



<p>For me, adding&nbsp;<strong>experiment management tools</strong>&nbsp;to my “standard” software development best practices was an&nbsp;<strong>aha-moment</strong>&nbsp;that made my machine learning projects more likely to succeed. I think, if you give it a go you will feel the same.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1620</post-id>	</item>
		<item>
		<title>F1 Score vs ROC AUC vs Accuracy vs PR AUC: Which Evaluation Metric Should You Choose?</title>
		<link>https://neptune.ai/blog/f1-score-accuracy-roc-auc-pr-auc</link>
		
		<dc:creator><![CDATA[Jakub Czakon]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 09:21:10 +0000</pubDate>
				<category><![CDATA[ML Model Development]]></category>
		<guid isPermaLink="false">https://neptune.test/f1-score-accuracy-roc-auc-pr-auc/</guid>

					<description><![CDATA[PR AUC and F1 Score are very robust evaluation metrics that work great for many classification problems, but from my experience, the most commonly used metrics are accuracy and ROC AUC. Are they better? Not really. As with the famous “AUC vs. accuracy” discussion, there are real benefits to using both. The big question is&#8230;]]></description>
										<content:encoded><![CDATA[
<p>PR AUC and F1 Score are very robust <a href="/blog/the-ultimate-guide-to-evaluation-and-selection-of-models-in-machine-learning" target="_blank" rel="noreferrer noopener">evaluation metrics</a> that work great for many classification problems, but from my experience, the most commonly used metrics are accuracy and ROC AUC. Are they better? Not really. As with the famous “AUC vs. accuracy” discussion, there are real benefits to using both. The big question is when.&nbsp;</p>



<p>There are many questions that you may have right now:</p>



<ul class="wp-block-list">
<li>When is accuracy a better evaluation metric than ROC AUC?</li>



<li>What is the F1 score good for?</li>



<li>What is the PR curve, and how do you actually use it?</li>



<li>If my dataset is highly imbalanced, should I use ROC AUC or PR AUC?</li>
</ul>



<p>As always, it depends, but understanding the trade-offs between different metrics is crucial when it comes to making the correct decision.</p>



<p>In this blog post, I will:</p>



<ul class="wp-block-list">
<li>Talk about some of the most common binary classification metrics, like F1 score, ROC AUC, PR AUC, and accuracy.</li>



<li>Compare them using an example binary classification problem.</li>



<li>Tell you what you should consider when deciding to choose one metric over the other (F1 score vs. ROC AUC).</li>
</ul>



<p>Ok, let’s do this!</p>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-evaluation-metrics-recap">Evaluation metrics recap</h2>



<p>I will start by introducing each of those classification metrics. Specifically:</p>



<ul class="wp-block-list">
<li>What is the definition and intuition behind it?</li>



<li>The non-technical explanation</li>



<li>How to calculate or plot it</li>



<li>When should you use it?</li>
</ul>



<section id="blog-intext-cta-block_da75dd68769d1050907b828d5a96d9c9" class="block-blog-intext-cta  c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

            <h3 class="block-blog-intext-cta__header" class="block-blog-intext-cta__header" id="h-tip">Tip</h3>
    
            <p>If you have read my previous blog post, <a href="/blog/evaluation-metrics-binary-classification/" target="_blank" rel="noreferrer noopener">“24 Evaluation Metrics for Binary Classification (And When to Use Them)”</a>,  you may want to skip this section and scroll down to the <a href="#h-evaluation-metrics-comparison">evaluation metrics comparison</a>.</p>
    
    </section>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-accuracy">Accuracy</h3>



<p>It measures how many observations, both positive and negative, were correctly classified.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/acc_eq.png?ssl=1" alt="accuracy"/></figure>
</div>


<p>You shouldn’t use accuracy on imbalanced problems. Then, it is easy to get a high accuracy score by simply classifying all observations as the majority class.</p>



<p>In Python, you can calculate it in the following way:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.metrics <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> confusion_matrix, accuracy_score

y_pred_class = y_pred_pos &gt; threshold
tn, fp, fn, tp = confusion_matrix(y_true, y_pred_class).ravel()
accuracy = (tp + tn) / (tp + fp + fn + tn)

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># or simply</span>

accuracy_score(y_true, y_pred_class)</pre></code></pre>
</div>




<p>Since the accuracy score is calculated on the predicted classes (not prediction scores), we need to apply a certain threshold before computing it. The obvious choice is the threshold of 0.5, but it can be suboptimal.</p>



<p>Let’s see an example of how accuracy depends on the threshold choice:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/acc_by_thres.png?ssl=1" alt="accuracy by threshold" style="width:768px;height:576px"/><figcaption class="wp-element-caption"><em>Accuracy by threshold</em></figcaption></figure>
</div>


<p>You can use charts like the one above to determine the optimal threshold. In this case, choosing something a bit over the standard 0.5 could bump the score by a tiny bit (0.9686–0.9688), but in other cases, the improvement can be more substantial.</p>



<p>So, when does it make sense to use it?&nbsp;</p>



<ul class="wp-block-list">
<li>When your problem is balanced, using accuracy is usually a good start. An additional benefit is that it is really easy to explain it to non-technical stakeholders in your project.</li>



<li>When every class is equally important to you.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-f1-score">F1 score</h3>



<p>Simply put, it combines precision and recall into one metric by calculating the harmonic mean between those two. It is actually a special case of the more general function F beta:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/fbeta_eq.png?ssl=1" alt="f beta"/></figure>
</div>


<p>When choosing beta in your F-beta score, the more you care about recall over precision, the higher beta you should choose. For example, with the F1 score, we care equally about recall and precision; with the F2 score, recall is twice as important to us.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/f_by_beta.png?ssl=1" alt="F beta by beta"/><figcaption class="wp-element-caption"><em>F beta threshold by beta</em></figcaption></figure>
</div>


<p>With 0&lt;beta&lt;1, we care more about precision, and so the higher the threshold, the higher the F beta score. When beta &gt; 1, our optimal threshold moves toward lower thresholds, and when beta = 1, it is somewhere in the middle.</p>



<p>It can be easily computed by running:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.metrics <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> f1_score

y_pred_class = y_pred_pos &gt; threshold
f1_score(y_true, y_pred_class)</pre></code></pre>
</div>




<p>It is important to remember that the F1 score is calculated from precision and recall, which, in turn, are calculated from the predicted classes (not prediction scores).</p>



<p>How should we choose an optimal threshold? Let’s plot the F1 score over all possible thresholds:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/f1_by_thres.png?ssl=1" alt="f1 score by threshold" style="width:768px;height:576px"/><figcaption class="wp-element-caption"><em>F1 score by threshold</em></figcaption></figure>
</div>


<p>We can adjust the threshold to optimize the F1 score. Notice that for both precision and recall, you could get perfect scores by increasing or decreasing the threshold. The good thing is that you can find a sweet spot for F1 scores. As you can see, getting the threshold just right can actually improve your score from 0.8077-&gt;0.8121.</p>



<p>When should you use it?</p>



<ul class="wp-block-list">
<li>Pretty much in every binary classification problem where you care more about the positive class. It is my go-to metric when working on those problems.&nbsp;</li>



<li>It can be easily explained to business stakeholders, which in many cases can be a deciding factor. Always remember that machine learning is just a tool to solve a business problem.&nbsp;</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-roc-auc">ROC AUC</h3>



<p>AUC means “area under the curve.” So, to speak about the ROC AUC score, we need to define the ROC curve first.&nbsp;</p>



<p>It is a chart that visualizes the trade-off between the true positive rate (TPR) and the false positive rate (FPR). Basically, for every threshold, we calculate TPR and FPR and plot them on one chart.</p>



<p>Of course, the higher the TPR and the lower the FPR for each threshold, the better, and so classifiers that have curves that are more top-left-side are better.</p>



<p>An extensive discussion of the ROC curve and the ROC AUC score can be found in this <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.10.9777&amp;rep=rep1&amp;type=pdf" target="_blank" rel="noreferrer noopener nofollow">article by Tom Fawcett</a>.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/roc_auc_curve.png?ssl=1" alt="roc curve" style="width:768px;height:576px"/><figcaption class="wp-element-caption"><em>ROC curves</em></figcaption></figure>
</div>


<p>We can see a healthy ROC curve pushed towards the top-left side for both positive and negative classes. It is not clear which one performs better across the board, as with FPR &lt; ~0.15 the positive class is higher, and starting from FPR~0.15 the negative class is above.</p>



<p>In order to get one number that tells us how good our curve is, we can calculate the Area Under the ROC Curve or ROC AUC score. The more top-left your curve is, the higher the area, and hence, the higher the ROC AUC score.</p>



<p>Alternatively,<a href="https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test#Area-under-curve_(AUC)_statistic_for_ROC_curves" target="_blank" rel="noreferrer noopener nofollow"> it can be shown</a> that the ROC AUC score is equivalent to calculating the rank correlation between predictions and targets. From an interpretation standpoint, it is more useful because it tells us that this metric shows how good your model is at ranking predictions. It tells you what the probability is that a randomly chosen positive instance is ranked higher than a randomly chosen negative instance.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.metrics <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> roc_auc_score

roc_auc = roc_auc_score(y_true, y_pred_pos)</pre></code></pre>
</div>




<ul class="wp-block-list">
<li>You should use it when you ultimately care about ranking predictions and not necessarily about outputting well-calibrated probabilities (read this <a href="https://machinelearningmastery.com/calibrated-classification-model-in-scikit-learn/" target="_blank" rel="noreferrer noopener nofollow">article by Jason Brownlee</a> if you want to learn about probability calibration).</li>



<li>You should not use it when your data is heavily imbalanced. This was discussed extensively in this <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4349800/" target="_blank" rel="noreferrer noopener nofollow">article by Takaya Saito and Marc Rehmsmeier</a>. The intuition is the following: the false positive rate for highly imbalanced datasets is pulled down due to a large number of true negatives.</li>



<li>You should use it when you care equally about positive and negative classes. It naturally extends the imbalanced data discussion from the last section. If we care about true negatives as much as we care about true positives, then it totally makes sense to use ROC AUC.</li>
</ul>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-pr-auc-average-precision">PR AUC | Average Precision</h3>



<p>Similarly to ROC AUC, in order to define PR AUC, we need to define the precision-recall curve.</p>



<p>It is a curve that combines precision (PPV) and recall (TPR) in a single visualization. For every threshold, you calculate PPV and TPR and plot them. The higher the y-axis on your curve, the better your model&#8217;s performance.</p>



<p>You can use this plot to make an educated decision when it comes to the classic precision/recall dilemma. Obviously, the higher the recall, the lower the precision. Knowing at which recall your precision starts to fall fast can help you choose the threshold and deliver a better model.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/prec_rec_curve.png?ssl=1" alt="precision recall curve" style="width:768px;height:576px"/><figcaption class="wp-element-caption"><em>Precision-Recall curve</em></figcaption></figure>
</div>


<p>We can see that for the negative class, we maintain high precision and recall almost throughout the entire range of thresholds. For the positive class, precision starts to fall as soon as we recall 0.2 of true positives, and by the time we hit 0.8, it decreases to around 0.7.</p>



<p>Similarly to the ROC AUC score, you can calculate the area under the precision-recall curve (PR AUC) to get one number that describes model performance.</p>



<p>You can also think of PR AUC as the average of precision scores calculated for each recall threshold. You can also adjust this definition to suit your business needs by choosing or clipping recall thresholds if needed.</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.metrics <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> average_precision_score

average_precision_score(y_true, y_pred_pos)</pre></code></pre>
</div>




<ul class="wp-block-list">
<li>when you want to communicate a precision or recall decision to other stakeholders</li>



<li>when you want to choose the threshold that fits the business problem.</li>



<li>when your data is heavily imbalanced. As mentioned before, it was discussed extensively in this <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4349800/" target="_blank" rel="noreferrer noopener nofollow">article by Takaya Saito and Marc Rehmsmeier</a>. The intuition is the following: since PR AUC focuses mainly on the positive class (PPV and TPR), it cares less about the frequent negative class.</li>



<li>when you care more about positive than negative class. If you care more about the positive class, and hence PPV and TPR, you should go with the precision-recall curve and PR AUC (average precision).</li>
</ul>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-evaluation-metrics-comparison">Evaluation metrics comparison</h2>



<p>We will compare the metrics we discussed so far with a use case that’s close to what you might typically see day-to-day as data scientists.</p>



<p>Based on a <a href="https://www.kaggle.com/c/ieee-fraud-detection/overview" target="_blank" rel="noreferrer noopener nofollow">Kaggle competiton</a> I created an example fraud detection problem:</p>



<ul class="wp-block-list">
<li>I selected only 43 features.&nbsp;</li>



<li>I sampled 66000 observations from the original dataset.</li>



<li>I adjusted the fraction of the positive class to 0.09.</li>
</ul>



<p>We’ll train a bunch of <a href="https://lightgbm.readthedocs.io/en/stable/" target="_blank" rel="noreferrer noopener nofollow">LightGBM classifiers</a> with different hyperparameters and will use the metrics to get an intuition as to which models are “truly” better. Specifically, I suspect that the model with only 10 trees is worse than a model with 100 trees. Of course, with more trees and smaller learning rates, it gets tricky, but I think it is a decent proxy.&nbsp;</p>



<p>To generate the results you will see below, run the following snippets of code in unison by changing the <a href="https://lightgbm.readthedocs.io/en/stable/Parameters.html" target="_blank" rel="noreferrer noopener nofollow">hyperparameters of LightGBM</a>.</p>



<section
	id="i-box-block_1acc879c14f931bb25a73202bb73677f"
	class="block-i-box  l-margin__top--large l-margin__bottom--x-large">

			<header class="c-header">
			<img
				src="https://neptune.ai/wp-content/themes/neptune/img/image-ratio-holder.svg"
				data-src="https://neptune.ai/wp-content/themes/neptune/img/blocks/i-box/header-icon.svg"
				width="24"
				height="24"
				class="c-header__icon lazyload"
				alt="">

			
            <h2 class="c-header__text animation " style='max-width: 100%;'   >
                <strong>Disclaimer</strong>
            </h2>		</header>
	
	<div class="block-i-box__inner">
		

<p>Please note that this article references a <strong>deprecated version of Neptune</strong>.</p>



<p>For information on the latest version with improved features and functionality, please <a href="/" target="_blank" rel="noreferrer noopener">visit our website</a>.</p>


	</div>

</section>



<p>First, we install and import the necessary libraries:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">pip install neptune pandas lightgbm matplotlib python-dotenv</pre></code></pre>
</div>





<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Python version: 3.9</span>
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> os
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> sys
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> neptune
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> pandas <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> pd
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> lightgbm
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> matplotlib.pyplot <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">as</span> plt

<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> dotenv <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> load_dotenv
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> neptune.integrations.xgboost <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> NeptuneCallback
<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Load the environment variables</span>
load_dotenv()</pre></code></pre>
</div>




<p>Then, download the data to your directory and read it with Pandas:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">TRAIN_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">"https://raw.githubusercontent.com/neptune-ai/blog-binary-classification-metrics/master/data/train.csv"</span>
TEST_PATH = <span class="hljs-string" style="color: rgb(221, 17, 68);">"https://raw.githubusercontent.com/neptune-ai/blog-binary-classification-metrics/master/data/test.csv"</span>

train = pd.read_csv(TRAIN_PATH)
test = pd.read_csv(TEST_PATH)</pre></code></pre>
</div>




<p>Now, split the data:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">feature_names = [col <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">for</span> col <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">in</span> train.columns <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">if</span> col <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">not</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">in</span> [<span class="hljs-string" style="color: rgb(221, 17, 68);">"isFraud"</span>]]

X_train, y_train = train[feature_names], train[<span class="hljs-string" style="color: rgb(221, 17, 68);">"isFraud"</span>]
X_test, y_test = test[feature_names], test[<span class="hljs-string" style="color: rgb(221, 17, 68);">"isFraud"</span>]</pre></code></pre>
</div>




<p><a href="https://docs-legacy.neptune.ai/usage/quickstart/" target="_blank" rel="noreferrer noopener">Retrieve your Neptune credentials</a> and instantiate a run object:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">project_name = os.getenv(<span class="hljs-string" style="color: rgb(221, 17, 68);">"NEPTUNE_PROJECT_NAME"</span>)
api_token = os.getenv(<span class="hljs-string" style="color: rgb(221, 17, 68);">"NEPTUNE_API_TOKEN"</span>)

run = neptune.init_run(project=project_name, api_token=api_token, name=args.name)</pre></code></pre>
</div>




<p>The run object establishes a connection between Neptune and your script and allows you to log model metadata to your dashboard. Here is the next section of the code:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">MODEL_PARAMS = {
    <span class="hljs-string" style="color: rgb(221, 17, 68);">"random_state"</span>: <span class="hljs-number" style="color: teal;">1234</span>,
    <span class="hljs-string" style="color: rgb(221, 17, 68);">"learning_rate"</span>: <span class="hljs-number" style="color: teal;">0.1</span>,
    <span class="hljs-string" style="color: rgb(221, 17, 68);">"n_estimators"</span>: <span class="hljs-number" style="color: teal;">1500</span>,
}

model = lightgbm.LGBMClassifier(**MODEL_PARAMS)
model.fit(X_train, y_train)

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Evaluate model</span>
y_test_probs = model.predict_proba(X_test)
y_test_preds = model.predict(X_test)</pre></code></pre>
</div>




<p>Now, we will log our metrics and hyperparameters using the run object:</p>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">from</span> sklearn.metrics <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> (
    accuracy_score,
    roc_auc_score,
    precision_score,
    recall_score,
    f1_score,
    average_precision_score,
)

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Calculate metrics</span>
accuracy = accuracy_score(y_test, y_test_preds)
roc_auc = roc_auc_score(y_test, y_test_probs[:, <span class="hljs-number" style="color: teal;">1</span>])  <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Assuming binary classification</span>
precision = precision_score(y_test, y_test_preds, average=<span class="hljs-string" style="color: rgb(221, 17, 68);">"weighted"</span>)
recall = recall_score(y_test, y_test_preds, average=<span class="hljs-string" style="color: rgb(221, 17, 68);">"weighted"</span>)
f1 = f1_score(y_test, y_test_preds, average=<span class="hljs-string" style="color: rgb(221, 17, 68);">"weighted"</span>)
pr_auc = average_precision_score(
    y_test, y_test_probs[:, <span class="hljs-number" style="color: teal;">1</span>], average=<span class="hljs-string" style="color: rgb(221, 17, 68);">"weighted"</span>
)

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># Log metrics to Neptune</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"accuracy"</span>] = accuracy
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"roc_auc"</span>] = roc_auc
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"precision"</span>] = precision
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"recall"</span>] = recall
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"f1"</span>] = f1
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"pr_auc"</span>] = pr_auc
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"learning_rate"</span>] = MODEL_PARAMS[‘learning_rate’]
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"n_estimators"</span>] = MODEL_PARAMS[‘n_estimators’]

run.stop()</pre></code></pre>
</div>




<p>I have run this script with a few different combinations of learning rates and estimators. You can find the full script and other files related to this project in <a href="https://github.com/BexTuychiev/blog-binary-classification-metrics" target="_blank" rel="noreferrer noopener nofollow">this GitHub repository</a>.&nbsp;</p>



<p>Now, let’s explore how our model is scoring on different metrics.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1065" height="481" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=1065%2C481&#038;ssl=1" alt="Runs table in neptune.ai" class="wp-image-40943" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?w=1065&amp;ssl=1 1065w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=768%2C347&amp;ssl=1 768w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=200%2C90&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=220%2C99&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=120%2C54&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=160%2C72&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=300%2C135&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=480%2C217&amp;ssl=1 480w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_5.png?resize=1020%2C461&amp;ssl=1 1020w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">Runs table | <a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6" target="_blank" rel="noreferrer noopener nofollow">See in Neptune</a></figcaption></figure>
</div>


<p>On this problem, all of those metrics rank models from best to worst very similarly, but there are slight differences. Also, the scores themselves can vary greatly.&nbsp;</p>



<p>In the next sections, we will discuss it in more detail.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-accuracy-vs-roc-auc">Accuracy vs. ROC AUC</h3>



<p>The first big difference is that you calculate accuracy on the predicted classes while you calculate ROC AUC on predicted scores. That means you will have to find the optimal threshold for your problem.&nbsp;</p>



<p>Moreover, accuracy looks at fractions of correctly assigned positive and negative classes. That means if our problem is highly imbalanced, we get a really high accuracy score by simply predicting that all observations belong to the majority class.</p>



<p>On the flip side, if your problem is balanced and you care about both positive and negative predictions, accuracy is a good choice because it is really simple and easy to interpret.</p>



<p>Another thing to remember is that ROC AUC is especially good at ranking predictions. Because of that, if you have a problem where sorting your observations is what you care about, ROC AUC is likely what you are looking for.</p>



<p>Now, let’s look at the results of our experiments:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="533" height="469" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=533%2C469&#038;ssl=1" alt="Experiments sorted by ROC AUC score in neptune.ai" class="wp-image-40942" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?w=533&amp;ssl=1 533w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=200%2C176&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=220%2C194&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=120%2C106&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=160%2C141&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=300%2C264&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_8.png?resize=480%2C422&amp;ssl=1 480w" sizes="auto, (max-width: 533px) 100vw, 533px" /><figcaption class="wp-element-caption">Experiments sorted by ROC AUC score | <a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6" target="_blank" rel="noreferrer noopener nofollow">See in Neptune</a></figcaption></figure>
</div>


<p>The first observation is that models rank almost exactly the same on ROC AUC and accuracy.</p>



<p>Secondly, accuracy scores start at 0.93 for the very worst model and go up to 0.97 for the best one. Remember that predicting all observations as majority class 0 would give 0.9 accuracy, so our worst experiment, BIN-98 is only slightly better than that. Yet the score itself is quite high, and it shows that you should always take an imbalance into consideration when looking at accuracy.&nbsp;</p>



<section id="note-block_d6f5957518352113e60b7a5738a16510"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

    
    <div class="block-note__content">
                    <div class="c-item c-item--wysiwyg_editor">

                
                
                <div class="c-item__content">

                                            <p><span style="font-weight: 400;">💡 There is an interesting metric called Cohen Kappa that takes imbalance into consideration by calculating the improvement in accuracy over the “sample according to class imbalance” model.</span></p>
<p><span style="font-weight: 400;">Read more about </span><a href="/blog/evaluation-metrics-binary-classification" target="_blank" rel="noopener"><span style="font-weight: 400;">Cohen Kappa here</span></a><span style="font-weight: 400;">.</span></p>
                                    </div>

            </div>
            </div>


</section>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-f1-score-vs-accuracy">F1 score vs Accuracy</h3>



<p>Both of those metrics take class predictions as input, so you will have to adjust the threshold regardless of which one you choose.</p>



<p>Remember that the F1 score balances precision and recall in the positive class, while accuracy looks at correctly classified observations, both positive and negative. That makes a big difference, especially for the imbalanced problems, where by default our model will be good at predicting true negatives and hence accuracy will be high. However, if you care equally about true negatives and true positives, then accuracy is the metric you should choose.&nbsp;</p>



<p>If we look at our experiments below:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="529" height="470" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=529%2C470&#038;ssl=1" alt="Experiments sorted by F1 score in neptune.ai" class="wp-image-40944" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?w=529&amp;ssl=1 529w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=200%2C178&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=220%2C195&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=120%2C107&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=160%2C142&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=300%2C267&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=480%2C426&amp;ssl=1 480w" sizes="auto, (max-width: 529px) 100vw, 529px" /><figcaption class="wp-element-caption">Experiments sorted by F1 score | <a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6&amp;query=&amp;lbViewUnpacked=true&amp;sortBy=%5B%22f1%22%5D&amp;sortFieldType=%5B%22float%22%5D&amp;sortFieldAggregationMode=%5B%22auto%22%5D&amp;sortDirection=%5B%22descending%22%5D" target="_blank" rel="noreferrer noopener nofollow">See in Neptune</a></figcaption></figure>
</div>


<p>In our example, both metrics are equally capable of helping us rank models and choose the best one. The class imbalance of 1-10 makes our accuracy really high by default. Because of that, even the worst model has very high accuracy, and the improvements as we go to the top of the table are not as clear on accuracy as they are on the F1 score.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-roc-auc-vs-pr-auc">ROC AUC vs. PR AUC</h3>



<p>What is common between ROC AUC and PR AUC is that they both look at prediction scores of classification models, not thresholded class assignments. What is different, however, is that ROC AUC looks at a true positive rate TPR and the false positive rate FPR, while PR AUC looks at the positive predictive value PPV and the true positive rate TPR.</p>



<p>Because of that, if you care more about the positive class, then using PR AUC, which is more sensitive to the improvements for the positive class, is a better choice. One common scenario is a highly imbalanced dataset where the fraction of positive classes, which we want to find (like in fraud detection), is small. I highly recommend taking a look at <a href="https://www.kaggle.com/discussions/general/7517" target="_blank" rel="noreferrer noopener nofollow">this Kaggle discussion thread </a>for a longer discussion on the subject of ROC AUC vs. PR AUC for imbalanced datasets.</p>



<p>If you care equally about the positive and negative classes or your dataset is quite balanced, then going with the ROC AUC is a good idea.</p>



<p>Let’s compare our experiments on those two metrics:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="533" height="468" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=533%2C468&#038;ssl=1" alt="Experiments sorted by ROC AUC score in neptune.ai" class="wp-image-40945" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?w=533&amp;ssl=1 533w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=200%2C176&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=220%2C193&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=120%2C105&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=160%2C140&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=300%2C263&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_13.png?resize=480%2C421&amp;ssl=1 480w" sizes="auto, (max-width: 533px) 100vw, 533px" /><figcaption class="wp-element-caption">Experiments sorted by ROC AUC score | <a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6&amp;query=&amp;lbViewUnpacked=true&amp;sortBy=%5B%22roc_auc%22%5D&amp;sortFieldType=%5B%22float%22%5D&amp;sortFieldAggregationMode=%5B%22auto%22%5D&amp;sortDirection=%5B%22descending%22%5D" target="_blank" rel="noreferrer noopener nofollow">See in Neptune</a></figcaption></figure>
</div>


<p>They rank models similarly, but there is a slight difference if you look at experiments BIN-100 and BIN 102.</p>



<p>However, the improvements calculated in Average Precision (PR AUC) are larger and clearer. We get from 0.69 to 0.87 when, at the same time, ROC AUC goes from 0.92 to 0.97. Because of that, ROC AUC can give a false sense of very high performance when, in fact, your model is not doing that well.</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-f1-score-vs-roc-auc">F1 score vs. ROC AUC</h3>



<p>One big difference between the F1 score and the ROC AUC is that the first one takes predicted classes, and the second takes predicted scores as input. Because of that, with the F1 score, you need to choose a threshold that assigns your observations to those classes. Often, you can <a href="https://neptune.ai/blog/improving-machine-learning-deep-learning-models">impro</a><a href="/blog/improving-machine-learning-deep-learning-models" target="_blank" rel="noreferrer noopener">v</a><a href="https://neptune.ai/blog/improving-machine-learning-deep-learning-models">e your model performance</a> a lot if you choose it well.</p>



<p>So, if you care about ranking predictions, don’t need them to be properly calibrated probabilities, and your dataset is not heavily imbalanced, then I would go with ROC AUC.</p>



<p>If your dataset is heavily imbalanced and/or you mostly care about the positive class, I’d consider using the F1 score, Precision-Recall curve, and PR AUC. The additional reason to go with F1 (or Fbeta) is that these metrics are easier to interpret and communicate to business stakeholders.</p>



<p>Let’s take a look at the experimental results for some more insights:&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="529" height="470" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=529%2C470&#038;ssl=1" alt="Experiments sorted by F1 score" class="wp-image-40944" srcset="https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?w=529&amp;ssl=1 529w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=200%2C178&amp;ssl=1 200w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=220%2C195&amp;ssl=1 220w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=120%2C107&amp;ssl=1 120w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=160%2C142&amp;ssl=1 160w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=300%2C267&amp;ssl=1 300w, https://i0.wp.com/neptune.ai/wp-content/uploads/2024/09/F1-Score-vs-ROC-AUC-vs-Accuracy-vs-PR-AUC_12.png?resize=480%2C426&amp;ssl=1 480w" sizes="auto, (max-width: 529px) 100vw, 529px" /><figcaption class="wp-element-caption">Experiments sorted by F1 score | <a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6&amp;query=&amp;lbViewUnpacked=true&amp;sortBy=%5B%22f1%22%5D&amp;sortFieldType=%5B%22float%22%5D&amp;sortFieldAggregationMode=%5B%22auto%22%5D&amp;sortDirection=%5B%22descending%22%5D" target="_blank" rel="noreferrer noopener nofollow">See in Neptune</a></figcaption></figure>
</div>


<p>Experiments rank identically on the F1 score (threshold = 0.5) and ROC AUC. However, the F1 score is lower in value, and the difference between the worst and the best model is larger. For the ROC AUC score, values are larger, and the difference is smaller.&nbsp;</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/neptune.ai/wp-content/uploads/2022/10/exp_98_f1_by_thres.png?ssl=1" alt="f1 score by threshold" style="width:768px;height:576px"/><figcaption class="wp-element-caption"><em>F1 score by threshold</em></figcaption></figure>
</div>


<section id="note-block_0afe8a51f0a5239c9eae5ebb2aa622f1"
         class="block-note c-box c-box--default c-box--dark c-box--no-hover c-box--standard ">

    
    <div class="block-note__content">
                    <div class="c-item c-item--text">

                
                
                <div class="c-item__content">

                                            <p>💡 If you would like to easily log those plots for every experiment, I have attached a logging helper at the end of this post.</p>
                                    </div>

            </div>
            </div>


</section>



<h2 class="wp-block-heading" class="wp-block-heading" id="h-final-thoughts">Final thoughts</h2>



<p>In this blog post, you’ve learned about a few common metrics used for evaluating binary classification models.</p>



<p>We’ve discussed how they are defined, how to interpret and calculate them, and when you should consider using them.</p>



<p>Finally, we compared those evaluation metrics to a real problem and discussed some typical decisions you may face.</p>



<p>With all this knowledge, you have the equipment to choose a good evaluation metric for your next binary classification problem!&nbsp;</p>



<h3 class="wp-block-heading" class="wp-block-heading" id="h-bonus">Bonus</h3>



<p>To make things a little bit easier, I have prepared a logging function that logs all the metrics, performance charts, and metrics by threshold charts described in this post.</p>



<h4 class="wp-block-heading">Logging function</h4>



<p>You can log all of those metrics and performance charts that we covered for your machine learning project and explore them in Neptune using our <a href="https://docs-legacy.neptune.ai/usage/" target="_blank" rel="noreferrer noopener">Python client</a> and <a href="https://docs-legacy.neptune.ai/integrations/" target="_blank" rel="noreferrer noopener">integrations</a> (in the example below, I use <a href="https://docs-legacy.neptune.ai/integrations/lightgbm/" target="_blank" rel="noreferrer noopener">Neptune-LightGBM integration</a>).</p>



<ul class="wp-block-list">
<li>install the client:</li>
</ul>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);">pip install -U neptune-lightgbm</pre></code></pre>
</div>




<ul class="wp-block-list">
<li>import and run:</li>
</ul>




<div
	style="opacity: 0;"
	class="block-code-snippet  l-padding__top--0 l-padding__bottom--0 l-margin__top--standard l-margin__bottom--standard block-code-snippet--regular language-py line-numbers block-code-snippet--show-header"
	data-show-header="show"
	data-header-text=""
>
	<pre style="font-size: .875rem;" data-prismjs-copy="Copy the JavaScript snippet!"><code><pre class="hljs" style="display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248);"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: 700;">import</span> neptune

run = neptune.init_run(...)
neptune_callback = NeptuneCallback(run=run)

gbm = lgb.train(
       params,
       lgb_train,
       callbacks=[neptune_callback],
)

custom_score = ...

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;"># log score to neptune</span>
run[<span class="hljs-string" style="color: rgb(221, 17, 68);">"logs/custom_score"</span>] = custom_score</pre></code></pre>
</div>




<ul class="wp-block-list">
<li>Explore<a href="https://app.neptune.ai/o/community/org/comparing-evaluation-metrics/runs/table?viewId=9cd5cba0-48df-432b-bcf4-32c6ec43d2a6" target="_blank" rel="noreferrer noopener nofollow"> everything in the app.</a></li>
</ul>



<p>You can log different kinds of metadata to Neptune, including metrics, charts, parameters, images, and more. <a href="https://docs-legacy.neptune.ai/logging/what_you_can_log/" target="_blank" rel="noreferrer noopener">Check the docs</a> to learn more.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1554</post-id>	</item>
	</channel>
</rss>