Skip to content
/ aim Public
forked from aimhubio/aim

The version control for AI

License

Notifications You must be signed in to change notification settings

bkal01/aim

 
 

Repository files navigation

Aim

GitHub Top Language PyPI Package License: MIT

A super-easy way to record, search and compare AI experiments.

Getting started in three steps

  1. Install Aim in your training environment
pip3 install aim-cli
  1. 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')
  1. Run the training and start the AI Dev Environment
aim up

Contents

Installation

To install Aim, you need to have python3 and pip3 installed in your environment

  1. 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

Command Line Interface

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.

init

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.

version

Display the version of the currently installed Aim CLI.

$ aim version

experiment

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.

de

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

up

An alias to aim de up :

$ aim up

Python Library

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.

How it works

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.

Sneak peek at AI development environment

TODO

About

The version control for AI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%