dkapur17
dkapur17

Reputation: 516

Logging and Fetching Run Parameters in AzureML

I am able to log and fetch metrics to AzureML using Run.log, however, I need a way to also log run parameters, like Learning Rate, or Momentum. I can't seem to find anything in the AzureML Python SDK documentation to achieve this. However, if I use MLflow's mlflow.log_param, I am able to log parameters, and they even nicely show up on the AzureML Studio Dashboard (bottom right of the image):

enter image description here

Again, I am able to fetch this using MLflow's get_params() function, but I can't find a way to do this using just AzureML's Python SDK. Is there a way to do this directly using azureml?

Upvotes: 0

Views: 655

Answers (2)

numericx
numericx

Reputation: 1

In AzureML Python SDK v1, you can save and get metrics from the Run object.

First find the run id (either in the UI or with the SDK)

from azureml.core.run import Run
run = Run(experiment=<experiment_name>, run_id=<run_id>)

Second, use the get_metrics method from the run object

run.get_metrics(name=None, recursive=False, run_type=None, populate=False)

Documentation:

Upvotes: 0

Sairam Tadepalli
Sairam Tadepalli

Reputation: 1683

The retrieving of log run parameters like Learning Rate, or Momentum is not possible with AzureML alone. Because it was tied with MLFlow and azureml-core. without those two involvements, we cannot retrieve the log run parameters.

pip install azureml-core mlflow azureml-mlflow

Need to install these three for getting run parameters. Link

Upvotes: 1

Related Questions