aimhubio / aim

Aim đŸ’Ģ — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
4.93k stars 297 forks source link
ai data-science data-visualization experiment-tracking machine-learning metadata metadata-tracking ml mlflow mlops prompt-engineering python pytorch tensorboard tensorflow visualization
Drop a star to support Aim ⭐ Join Aim discord community

An easy-to-use & supercharged open-source experiment tracker

Aim logs your training runs and any AI Metadata, enables a beautiful UI to compare, observe them and an API to query them programmatically.


[![Discord Server](https://dcbadge.vercel.app/api/server/zXq2NfVdtF?compact=true&style=flat)](https://community.aimstack.io/) [![Twitter Follow](https://img.shields.io/twitter/follow/aimstackio?style=social)](https://twitter.com/aimstackio) [![Medium](https://img.shields.io/badge/Medium-12100E?style=flat&logo=medium&logoColor=white)](https://medium.com/aimstack) [![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-blue)]() [![PyPI - Python Version](https://img.shields.io/badge/python-%3E%3D%203.7-blue)](https://pypi.org/project/aim/) [![PyPI Package](https://img.shields.io/pypi/v/aim?color=yellow)](https://pypi.org/project/aim/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg)](https://opensource.org/licenses/Apache-2.0) [![PyPI Downloads](https://img.shields.io/pypi/dw/aim?color=green)](https://pypi.org/project/aim/) [![Issues](https://img.shields.io/github/issues/aimhubio/aim)](http://github.com/aimhubio/aim/issues)


SEAMLESSLY INTEGRATES WITH:


TRUSTED BY ML TEAMS FROM:


AimStack offers enterprise support that's beyond core Aim. Contact via hello@aimstack.io e-mail.


AboutDemosEcosystemQuick StartExamplesDocumentationCommunityBlog


ℹī¸ About

Aim is an open-source, self-hosted ML experiment tracking tool designed to handle 10,000s of training runs.

Aim provides a performant and beautiful UI for exploring and comparing training runs. Additionally, its SDK enables programmatic access to tracked metadata — perfect for automations and Jupyter Notebook analysis.

Aim's mission is to democratize AI dev tools đŸŽ¯


Log Metadata Across Your ML Pipeline 💾 Visualize & Compare Metadata via UI 📊
  • ML experiments and any metadata tracking
  • Integration with popular ML frameworks
  • Easy migration from other experiment trackers
  • Metadata visualization via Aim Explorers
  • Grouping and aggregation
  • Querying using Python expressions
Run ML Trainings Effectively ⚡ Organize Your Experiments 🗂ī¸
  • System info and resource usage tracking
  • Real-time alerting on training progress
  • Logging and configurable notifications
  • Detailed run information for easy debugging
  • Centralized dashboard for holistic view
  • Runs grouping with tags and experiments

đŸŽŦ Demos

Check out live Aim demos NOW to see it in action.

Machine translation experiments lightweight-GAN experiments
Training logs of a neural translation model(from WMT'19 competition). Training logs of 'lightweight' GAN, proposed in ICLR 2021.
FastSpeech 2 experiments Simple MNIST
Training logs of Microsoft's "FastSpeech 2: Fast and High-Quality End-to-End Text to Speech". Simple MNIST training logs.

🌍 Ecosystem

Aim is not just an experiment tracker. It's a groundwork for an ecosystem. Check out the two most famous Aim-based tools.

aimlflow Aim-spaCy
aimlflow Aim-spaCy
Exploring MLflow experiments with a powerful UI an Aim-based spaCy experiment tracker

🏁 Quick start

Follow the steps below to get started with Aim.

1. Install Aim on your training environment

pip3 install aim

2. Integrate Aim with your code

from aim import Run

# Initialize a new run
run = Run()

# Log run parameters
run["hparams"] = {
    "learning_rate": 0.001,
    "batch_size": 32,
}

# Log 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" })

_See the full list of supported trackable objects(e.g. images, text, etc) here._

3. Run the training as usual and start Aim UI

aim up

Learn more

Migrate from other tools
Aim has built-in converters to easily migrate logs from other tools. These migrations cover the most common usage scenarios. In case of custom and complex scenarios you can use Aim SDK to implement your own conversion script. - [TensorBoard logs converter](https://aimstack.readthedocs.io/en/latest/quick_start/convert_data.html#show-tensorboard-logs-in-aim) - [MLFlow logs converter](https://aimstack.readthedocs.io/en/latest/quick_start/convert_data.html#show-mlflow-logs-in-aim) - [Weights & Biases logs converter](https://aimstack.readthedocs.io/en/latest/quick_start/convert_data.html#show-weights-and-biases-logs-in-aim)
Integrate Aim into an existing project
Aim easily integrates with a wide range of ML frameworks, providing built-in callbacks for most of them. - [Integration with Pytorch Ignite](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-pytorch-ignite) - [Integration with Pytorch Lightning](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-pytorch-lightning) - [Integration with Hugging Face](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-hugging-face) - [Integration with Keras & tf.Keras](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-keras-tf-keras) - [Integration with Keras Tuner](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-keras-tuner) - [Integration with XGboost](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-xgboost) - [Integration with CatBoost](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-catboost) - [Integration with LightGBM](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-lightgbm) - [Integration with fastai](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-fastai) - [Integration with MXNet](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-mxnet) - [Integration with Optuna](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-optuna) - [Integration with PaddlePaddle](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-paddlepaddle) - [Integration with Stable-Baselines3](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-stable-baselines3) - [Integration with Acme](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-acme) - [Integration with Prophet](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-prophet)
Query runs programmatically via SDK
Aim Python SDK empowers you to query and access any piece of tracked metadata with ease. ```python from aim import Repo my_repo = Repo('/path/to/aim/repo') query = "metric.name == 'loss'" # Example query # Get collection of metrics for run_metrics_collection in my_repo.query_metrics(query).iter_runs(): for metric in run_metrics_collection: # Get run params params = metric.run[...] # Get metric values steps, metric_values = metric.values.sparse_numpy() ```
Set up a centralized tracking server
Aim remote tracking server allows running experiments in a multi-host environment and collect tracked data in a centralized location. See the docs on how to [set up the remote server](https://aimstack.readthedocs.io/en/latest/using/remote_tracking.html).
Deploy Aim on kubernetes
- The official Aim docker image: https://hub.docker.com/r/aimstack/aim - A guide on how to deploy Aim on kubernetes: https://aimstack.readthedocs.io/en/latest/using/k8s_deployment.html

Read the full documentation on aimstack.readthedocs.io 📖

🆚 Comparisons to familiar tools

TensorBoard vs Aim
**Training run comparison** Order of magnitude faster training run comparison with Aim - The tracked params are first class citizens at Aim. You can search, group, aggregate via params - deeply explore all the tracked data (metrics, params, images) on the UI. - With tensorboard the users are forced to record those parameters in the training run name to be able to search and compare. This causes a super-tedius comparison experience and usability issues on the UI when there are many experiments and params. **TensorBoard doesn't have features to group, aggregate the metrics** **Scalability** - Aim is built to handle 1000s of training runs - both on the backend and on the UI. - TensorBoard becomes really slow and hard to use when a few hundred training runs are queried / compared. **Beloved TB visualizations to be added on Aim** - Embedding projector. - Neural network visualization.
MLflow vs Aim
MLFlow is an end-to-end ML Lifecycle tool. Aim is focused on training tracking. The main differences of Aim and MLflow are around the UI scalability and run comparison features. Aim and MLflow are a perfect match - check out the [aimlflow](https://github.com/aimhubio/aimlflow) - the tool that enables Aim superpowers on Mlflow. **Run comparison** - Aim treats tracked parameters as first-class citizens. Users can query runs, metrics, images and filter using the params. - MLFlow does have a search by tracked config, but there are no grouping, aggregation, subplotting by hyparparams and other comparison features available. **UI Scalability** - Aim UI can handle several thousands of metrics at the same time smoothly with 1000s of steps. It may get shaky when you explore 1000s of metrics with 10000s of steps each. But we are constantly optimizing! - MLflow UI becomes slow to use when there are a few hundreds of runs.
Weights and Biases vs Aim
Hosted vs self-hosted - Weights and Biases is a hosted closed-source MLOps platform. - Aim is self-hosted, free and open-source experiment tracking tool.

đŸ›Ŗī¸ Roadmap

Detailed milestones

The Aim product roadmap :sparkle:

High-level roadmap

The high-level features we are going to work on the next few months:

In progress

Next-up
**Aim UI** - Runs management - Runs explorer – query and visualize runs data(images, audio, distributions, ...) in a central dashboard - Explorers - Distributions Explorer **SDK and Storage** - Scalability - Smooth UI and SDK experience with over 10.000 runs - Runs management - CLI commands - Reporting - runs summary and run details in a CLI compatible format - Manipulations – copy, move, delete runs, params and sequences - Cloud storage support – store runs blob(e.g. images) data on the cloud - Artifact storage – store files, model checkpoints, and beyond **Integrations** - ML Frameworks: - Shortlist: scikit-learn - Resource management tools - Shortlist: Kubeflow, Slurm - Workflow orchestration tools
Done
- [x] Live updates (Shipped: _Oct 18 2021_) - [x] Images tracking and visualization (Start: _Oct 18 2021_, Shipped: _Nov 19 2021_) - [x] Distributions tracking and visualization (Start: _Nov 10 2021_, Shipped: _Dec 3 2021_) - [x] Jupyter integration (Start: _Nov 18 2021_, Shipped: _Dec 3 2021_) - [x] Audio tracking and visualization (Start: _Dec 6 2021_, Shipped: _Dec 17 2021_) - [x] Transcripts tracking and visualization (Start: _Dec 6 2021_, Shipped: _Dec 17 2021_) - [x] Plotly integration (Start: _Dec 1 2021_, Shipped: _Dec 17 2021_) - [x] Colab integration (Start: _Nov 18 2021_, Shipped: _Dec 17 2021_) - [x] Centralized tracking server (Start: _Oct 18 2021_, Shipped: _Jan 22 2022_) - [x] Tensorboard adaptor - visualize TensorBoard logs with Aim (Start: _Dec 17 2021_, Shipped: _Feb 3 2022_) - [x] Track git info, env vars, CLI arguments, dependencies (Start: _Jan 17 2022_, Shipped: _Feb 3 2022_) - [x] MLFlow adaptor (visualize MLflow logs with Aim) (Start: _Feb 14 2022_, Shipped: _Feb 22 2022_) - [x] Activeloop Hub integration (Start: _Feb 14 2022_, Shipped: _Feb 22 2022_) - [x] PyTorch-Ignite integration (Start: _Feb 14 2022_, Shipped: _Feb 22 2022_) - [x] Run summary and overview info(system params, CLI args, git info, ...) (Start: _Feb 14 2022_, Shipped: _Mar 9 2022_) - [x] Add DVC related metadata into aim run (Start: _Mar 7 2022_, Shipped: _Mar 26 2022_) - [x] Ability to attach notes to Run from UI (Start: _Mar 7 2022_, Shipped: _Apr 29 2022_) - [x] Fairseq integration (Start: _Mar 27 2022_, Shipped: _Mar 29 2022_) - [x] LightGBM integration (Start: _Apr 14 2022_, Shipped: _May 17 2022_) - [x] CatBoost integration (Start: _Apr 20 2022_, Shipped: _May 17 2022_) - [x] Run execution details(display stdout/stderr logs) (Start: _Apr 25 2022_, Shipped: _May 17 2022_) - [x] Long sequences(up to 5M of steps) support (Start: _Apr 25 2022_, Shipped: _Jun 22 2022_) - [x] Figures Explorer (Start: _Mar 1 2022_, Shipped: _Aug 21 2022_) - [x] Notify on stuck runs (Start: _Jul 22 2022_, Shipped: _Aug 21 2022_) - [x] Integration with KerasTuner (Start: _Aug 10 2022_, Shipped: _Aug 21 2022_) - [x] Integration with WandB (Start: _Aug 15 2022_, Shipped: _Aug 21 2022_) - [x] Stable remote tracking server (Start: _Jun 15 2022_, Shipped: _Aug 21 2022_) - [x] Integration with fast.ai (Start: _Aug 22 2022_, Shipped: _Oct 6 2022_) - [x] Integration with MXNet (Start: _Sep 20 2022_, Shipped: _Oct 6 2022_) - [x] Project overview page (Start: _Sep 1 2022_, Shipped: _Oct 6 2022_) - [x] Remote tracking server scaling (Start: _Sep 11 2022_, Shipped: _Nov 26 2022_) - [x] Integration with PaddlePaddle (Start: _Oct 2 2022_, Shipped: _Nov 26 2022_) - [x] Integration with Optuna (Start: _Oct 2 2022_, Shipped: _Nov 26 2022_) - [x] Audios Explorer (Start: _Oct 30 2022_, Shipped: _Nov 26 2022_) - [x] Experiment page (Start: _Nov 9 2022_, Shipped: _Nov 26 2022_) - [x] HuggingFace datasets (Start: _Dec 29 2022_, _Feb 3 2023_)

đŸ‘Ĩ Community

Aim README badge

Add Aim badge to your README, if you've enjoyed using Aim in your work:

Aim

[![Aim](https://img.shields.io/badge/powered%20by-Aim-%231473E6)](https://github.com/aimhubio/aim)

Cite Aim in your papers

In case you've found Aim helpful in your research journey, we'd be thrilled if you could acknowledge Aim's contribution:

@software{Arakelyan_Aim_2020,
  author = {Arakelyan, Gor and Soghomonyan, Gevorg and {The Aim team}},
  doi = {10.5281/zenodo.6536395},
  license = {Apache-2.0},
  month = {6},
  title = {{Aim}},
  url = {https://github.com/aimhubio/aim},
  version = {3.9.3},
  year = {2020}
}

Contributing to Aim

Considering contibuting to Aim? To get started, please take a moment to read the CONTRIBUTING.md guide.

Join Aim contributors by submitting your first pull request. Happy coding! 😊

Made with contrib.rocks.

More questions?

  1. Read the docs
  2. Open a feature request or report a bug
  3. Join Discord community server