Skip to content

Quick start

Get up and running quickly with Comet.

  • Set up a Comet account.
  • Get a Comet API key.
  • Install Comet in your Project.
  • Create an Experiment and log data to Comet.
  • See logged experiments in the Comet user interface.

Set up a Comet account

Creating a new account is easy and free. Visit Comet and create an account using either your email or GitHub credentials.

Project View

Get an API key

  1. In the top right corner, click your avatar then select Account settings.
  2. Click the API Keys tab. Your current API key is displayed there. Click Copy to copy the API key to the clipboard.

User profile

Once the key is generated you should see a notification on the top right corner of your browser window. Then hover over the API Key button to reveal the key. Clicking the key copies it to your clipboard.

Install Comet

There are several ways to install Comet in your system. The easiest way is using pip.

pip install comet_ml
conda install -c anaconda -c conda-forge -c comet_ml comet_ml
%pip install comet_ml

Create an Experiment and log to Comet

To add a Comet Experiment to your Project, simply copy and paste the following snippet into the top of your file:

## import comet_ml at the top of your file
from comet_ml import Experiment

## Create an experiment with your api key
experiment = Experiment(
    api_key="Your API Key",
    project_name="Your Project Name",
    workspace="Your Workspace Name",
metrics = {'accuracy': 0.9, 'loss': 0.01}
experiment.log_metrics(metrics, step=1)
parameters = {'batch_size': 32, 'learning_rate': 0.0001}

See logged Experiments in the Comet UI

Logged experiments are displayed in the Comet UI. Comet organizes all of your runs as experiments that are contained within projects.

Experiment table

There are multiple levels of visualizations available in the Comet UI. For more, see Track a training run.

Try it out!

Try running an experiment and logging data to Comet.

Open In Colab

Learn more

Nov. 23, 2023