Oct 23, 2024

Log insights from your ML experiments: Why Reports matter

Author:Tatyana Manaseryan
Log insights from your ML experiments: Why Reports matter

Iterating over analyses is an essential part of model training. ML engineers run many experiments, tweaking models and tuning hyperparameters. Reports make it easier to track the progress and see how models improve.

For teams, interactive reports are even more important. Without them, insights can become scattered as different members work on separate data parts.

blog image

And yes, this slows down the entire development process..ā³

Reports unite key findings, making it easy to track who analyzed what and how decisions were made, fostering better communication and alignment across the team.

That's why Reports are essential and we created it for you! šŸŽ‰

Use Aim reports to show your work and iterate over the knowledge around it. And of course, do it with your collaborators.

  • Process tracked metadata and produce new plots directly within the Aim UI, saving time by eliminating the need to write custom plotting functions.

How to use Aim reports.

Reports work as a real-time markdown editor where you can embed queries to the data via regular python as well as use all the markdown abilities to document around.

Imagine a scenario where youā€™ve noticed the best performing run and want to make sure that you catch and store all the information about this specific run.

How?

Navigate to Reports page (Button is located on the side bar, scroll it and youā€™ll see šŸ‘€) and click on +New.

blog image

The Best Run - Overview

This snippet will generate the best run overview:

```aim
metrics_of_interest = 'metric.name in ("Loss", "__system__cpu")'
run_of_interest = 'run.hash == "d9e89aa7875e44b2ba85612a"'
metrics = repo.fetch_metrics(metrics_of_interest + ' and ' + run_of_interest)
JSON(metrics[0]['run']['train_config'])

blog image

Now letā€™s move on to the next task.

Visualization objects and methods

Loss and System CPU metrics

With Aim reports, itā€™s quite easy to plot the data, write the assumptions and save for a later view.

We are to try out other batch sizes with the hope to reduce the total loss to 1.03.

Run this snippet and youā€™ll get the line charts in less than 2 seconds.

```aim
metrics_of_interest = 'metric.name in ("Loss", "__system__cpu")'
run_of_interest = 'run.hash == "d9e89aa7875e44b2ba85612a"'
metrics = repo.fetch_metrics(metrics_of_interest + ' and ' + run_of_interest)

linechart = LineChart(metrics)
linechart.group('column', ['metric.name'])
linechart.group('row', ['metric.context.type'])
```

blog image

blog image

āÆšŸ–¼ļøYou can also retrieve images and audios from Aim storage.

Just run simple commands like: fetch_images , fetch_audios

blog image

You can also retrieve metrics, figures and texts from Aim storage and group them by Ā color, stroke_style, row, column .

TheĀ groupĀ method can be applied multiple times sequentially.

blog image

When you finish, donā€™t forget to save your report! šŸ“‘

blog image

A report not only allows you to customize widgets for your analysis but also keeps a persistent set of runs visible each time you open it.

šŸ”This makes it easy to return and review experiments anytime.

With Aim reports:

  • itā€™s simple to visualize data,
  • make informed assumptions,
  • and document your analysis in one place.

You can save these reports for future reference, ensuring that your insights remain accessible for team collaboration or review. This keeps the workflow smooth and makes it easier to track experiments and their outcomes over time.

And yes, each report comes with a shareable URLā€”perfect for keeping your teammates in the loop! We know youā€™ve been waiting for thisā€¦ šŸ¤Ÿ

Learn More

But thatā€™s not allā€”there's so much more you can do with Aim reports.

Check out the docs and feel free to reach out to us on our Discord community if you have any questions!

Join the Aim community šŸ’œ