Getting started

You only need a few steps to get started with Aim.


Install Aim via pip3:

pip3 install aim


You need to have python3 and pip3 installed in your environment before installing Aim.

Integrate with your code

  1. Create Run stored in the current directory:

from aim import Run

run = Run()
  1. Log parameters:

run['hparams'] = {
    'learning_rate': 0.001,
    'batch_size': 32,
  1. Track metrics:

for i in range(10):
    run.track(i, name='loss', step=i, context={ "subset":"train" })
    run.track(i, name='acc', step=i, context={ "subset":"train" })

More details/examples here.

Congrats! Your first run is ready!

Run Aim UI

Start up the Aim UI to observe the run:

aim up

See more details in UI basics.

Query metadata via SDK

from aim import Repo

# Read .aim repo located at the current working directory
repo = Repo('.')

# Get collection of metrics
for run_metrics_collection in repo.query_metrics(" == 'loss'").iter_runs():
    for metric in run_metrics_collection:
        # Get run params
        params =[...]
        # Get metric values
        steps, metric_values = metric.values.sparse_numpy()

See more details in SDK basics.