A simple script to report ML metrics to Azure ML and Azure AppInsights at the same time!
-
There is no out-of-the-box way to report metrics to AppInsights and Azure ML simultaneously == more lines of code than necessary.
-
AML currently does not allow you to report metrics to both parent- and childrun simultaneously == more lines of code than necesary.
Therefore, this simple class aims to reduce lines of code for AML metric reporting, so reporting in Azure becomes a tiny bit more fun! Also, it follows some engineering best practices, like tests, environment variables and constants - you know, just as a reminder of what's nice.
-
Make sure you have an AML Workspace
-
Make sure you have an AppInsights resource
-
Add the
condensed_binocular.py
script in your project. Don't forget to add the.env
file and theconstants.py
file if feel like using them this way, and change accordingly. -
Integrate in your code. See
binocular_sample.py
on how to use it. -
Wait until your experiment ran, and check if the values show up in both the AML Experiment as in AppInsights.
-
PROFIT.
Not working as expected or nice little additions necessary? PRs are welcome! For major changes, please open an issue first.