aimrun
A simple interface for integrating aim into MLOps frameworks.
Installation
pip install aimrun
Features
- Multiple runs. Simply initialize multiple aimruns using
aimrun.init()
, and track to multiple repositories at once. - No need for a main-process wrapper. You do not need to make sure that only the main-process calls aimrun functions - we take care of that for you.
- Sync project-specific (local) repositories to larger (remote) repositories. See
python -m aimrun sync --help
for guidance.
Usage (Recommended)
- Initialize one or more aimruns using
aimrun.init()
- Use
aimrun.track()
to track values. Parse a dictionary. - Use
aimrun.close()
to finalize the experiments.
Example usage
import aimrun
aimrun.init(repo='aim://172.3.66.145:53800', experiment='my_experiment', description='description of run' args={"arg": 1})
aimrun.track({"value_0": A, "value_1": B})
aimrun.track(A, name="value_0")
aimrun.close()
Synchronizing on-going runs
aimrun.init(repo=".", sync_repo='aim://172.3.66.145:53800', sync_args={"repeat": 60}, experiment='my_experiment', description='description of run' args={"arg": 1})
This starts a thread that incrementally synchronizes the current on-going run to a remote repo while using the current directory as the local repository.
To profit from mass updates (faster synchronization), consider installing an improved aim version:
pip install git+https://github.com/schneiderkamplab/aim
Drop-in replacement Wandb (Experimental)
We experimentally offer aimrun as a drop-in replacement for wandb, making a seamless integration in your framework even easier.
- Replace
import wandb
with from aimrun import wandb
- Set default repository before init (e.g. right after import)
wandb.set_default_repo('aim://172.3.66.145:53800')
- Supported functions
.init(), .log(), .finish()