A super-easy way to record, search and compare AI experiments.
- Install Aim in your training environment
pip3 install aim-cli
- Import Aim in your training code
import aim
aim.init() # initialize aim recorder
...
aim.track(metric_value, name='my-meaningful-metric-name', epoch=the_epoch)
aim.track(hyperparam_dict, namespace='hyperparams-name-that-makes-sense')
- Run the training and start the AI Dev Environment
aim up
To install Aim, you need to have python3 and pip3 installed in your environment
- Install Aim python packaage
$ pip3 install aim-cli
Aim Development Environment requires Docker to be installed in the environment. Run the command to start the aim development environment.
$ aim up
Aim CLI offers a simple interface to easily organize and record the experiments. Paired with the PyThon Library, Aim becomes a powerful utility to record, search and compare AI experiments. This is how the commands look like:
Command | Description |
---|---|
init |
Initialize the aim repository. |
version |
Displays the version of aim cli currently installed. |
experiment |
Creates a new experiment branch to group similar training runs into. |
de |
Starts the AI Development Environment. |
up |
An alias to aim de up . |
Initialize the aim repo to record the experiments.
$ aim init
Creates .aim
directory to save the recorded experiments to.
Running aim init
in an existing repository will prompt the user for re-initialization.
Beware: Re-initialization of the repo clears .aim
folder from previously saved data and initializes new repo.
Also see how to initialize repo safely by Python Library.
Display the version of the currently installed Aim CLI.
$ aim version
Create new experiment branches to organize the training runs related to the same experiment Here is how it works:
$ aim experiment COMMAND [ARGS]
Command | Args | Description |
---|---|---|
add |
-n | --name <exp_name> |
Add new experiment branch with a given name. |
checkout |
-n | --name <exp_name> |
Switch/checkout to an experiment branch with given name. |
ls |
List all the experiments of the repo. | |
rm |
-n | --name <exp_name> |
Remove an experiment with the given name. |
Disclaimer: Removing the experiment also removes the recorded experiment data.
AI Development Environment is a web app that runs locally on researcher's training environment, mounts the .aim
folder and lets researchers manage, search and start new training runs.
Start up the AI Development Environment (ADE)
$ aim de [COMMAND]
Disclaimer: ADE uses docker containers to run and having docker installed in the training environment is mandatory for ADE to run. Most of the environments nowadays have docker preinstalled or installed for other purposes so this should not be a huge obstacle to get started with ADE.
Command | Args | Description |
---|---|---|
up |
-p <port> | -v version |
Starts the AI Development Environment for the given repo |
down |
Turn off the AI Development Environment | |
pull |
-v <version> |
Pull the ADE of the given version |
upgrade |
Upgrade the ADE to its latest version |
An alias to aim de up
:
$ aim up
Use Python Library to instrument your training code to record the experiments. The instrumentation only takes 2 lines:
import aim
aim.init()
Afterwards, simply use the aim.track
function to track either metrics or hyperparameters (any dict really).
...
aim.track(metric_value, name='my-meaningful-metric-name', epoch=current_epoch)
aim.track(hyperparam_dict, namespace='hyperparams-name-that-makes-sense')
...
Use track
function anywhere with any framework to track the metrics. Metrics with the same name
or namespace
will be collected and rendered together.
The stack of projects that enable AI Development Environment:
- Aim - Version Control for AI Experiments.
- Aim Records - an effective storage to store recorded AI metadata.
- Aim DE - AI Development Environment to record, search and compare the training runs.
TODO