Search code examples
pythonazureazure-machine-learning-servicemlflow

Getting Bad request while searching run in mlflow


Training a ml model with mlflow in azure environment.

import mlflow
from mlflow import MlflowClient
from azureml.core import Experiment, Workspace

experiment_name = 'housing-lin-mlflow'

experiment = Experiment(ws, experiment_name)

runs = mlflow.search_runs(experiment_ids=[ experiment.id ])

While fetching runs from search_runs getting this error :

RestException: BAD_REQUEST: For input string: "5b649b3c-3b8f-497a-bb4f"

MLflow version : 1.28.0 In Azure studio jobs have been created and successfully run.


Solution

  • The bad request in MLFlow after successful running the job is because of not giving proper API permissions for the application.

    enter image description here

    Search for MLFLOW

    enter image description here

    Scroll down

    enter image description here

    Click on View API Permissions

    enter image description here

    Under API permissions, assign the permissions according to the application running region and requirements. Checkout the document for further information.