Using Comet ML for Experiment Management

Using Comet ML for Experiment Management

Oct 22, 2023   ·  3 min read

New tools are coming out every day that can make our work easier within the fields of Data Science, Machine Learning, and AI. Comet ML is a promising tool that offers a platform with several helpful features, one being experiment management.

Iterating upon a machine learning model is hard enough, but comparing the results of one model iteration to another shouldn't be. Unfortunately, this isn't the case and it can be quite difficult without the proper system or tooling to do so. Let me tell you about a tool that will eliminate this problem and give you the insights you need to improve your models quickly and effectively. 

What is Comet?

Comet ML is a platform designed to minimize the friction that often exists when creating and maintaining machine learning models and systems. It does this through a complimentary cycle between (1) experiment management and (2) production monitoring, its two primary features and selling points.

The process for training, deploying, and monitoring your ML models can involve an unmanageable amount of tools (see my article on Choosing Your MLOps Stack). Comet aims to alleviate this pressure for those using any one of the main ML libraries and frameworks, such as TensorFlow, Keras, Scikit Learn, Pytorch, XGBoost, etc. Not only that, but Comet is also agnostic to whatever environment a model is developed in, whether it's a local laptop, Amazon EC2 instance, Kubernetes, or whatever else you might have at your disposal.

Tracking and monitoring ML models without Comet...

Tracking and monitoring ML models with Comet...

We'll focus solely on Comet's experiment management in this article, which offers a number of solutions across the ML lifecycle, as shown below. 

Experiment Management with Comet ML

You can get started in no time with Comet's experiment management in two simple steps:

#1 Sign up for a free Comet account

After signing up at, you'll be presented with helpful guides to quickly get you up and running with Comet, along with example projects like the following:

#2 Add Comet to your environment and code

To start using Comet's experiment management for your projects, just  pip install comet_ml  in your environment and add the following code to your Python script. 

I created a project on GitHub to demonstrate how to use Comet with TensorFlow to train an NLP model on the IMDb dataset. The repository is set up with a Docker devcontainer that you can use to easily replicate the process on your own machine. The following images are screenshots showing how simple it was for me to get up and running with Comet.

Run python within the Docker devcontainer:

Visit your profile on and find the newly created "movie-reviews" project:

After running additional training experiments, you can expect to see more data placed within your project's dashboard to compare and contrast results across experiments:

From here, you can add more "panels" to your dashboard to give you and your team additional insight into your experiments:

If you found any of my content helpful, please consider donating
using one of the following options   Anything is appreciated!