0

I've tried running the code on this page through pycharm on my local machine and connecting an an azureml compute cluster. azureml mlflow projects (Preview)

I have my MLProject file:

name: mlflow_test
conda_env: conda.yaml
entry_points:
  testing:
    command: "python mlflow_test.py"

Set up connection to the workspace, set the tracking uri to be the workspace tracking uri and then run:

    mlflow.projects.run('.',
                    entry_point='testing',
                    experiment_name='mlflow_test',
                    backend='azureml',
                    backend_config={"COMPUTE": "general-compute", "USE_CONDA": True}
                    )

general compute is the name of a compute cluster I have created.

This always raises the error: AttributeError: 'Project' object has no attribute 'conda_env_path'

looking at the azureml-mlflow code it seems to be looking for mlproject.conda_env_path where mlproject is a mlflow Project class that doesn't have any attribute conda_env_path, infact conda_env_path is passed into the constructor and becomes Project().env_config_path.

Have I done something completely wrong here, if so, many thanks in advance

I have tried not using a conda envrionment, azureml seems to require the environment specified to be a conda environment for remote compute.

I've tried USE_CONDA True and False but according to documentation, if COMPUTE is specified this has no effect.

I tried changing the azureml-mlflow code to reference env_config_path and this raised another error all together.

C.Holmes
  • 13
  • 3

1 Answers1

0

Based on the scenario, I have reproduced the issue with sample notebook. enter image description here It seems like the latest mlflow package has dropped the support for MLproject for remote compute. You can execute the code snippet in local without backend_config.

To solve the issue, downgrade the mlflow version to 1.25.0.

pip install mlflow==1.25.0

With the below package versions:

The run successfully executed. enter image description here

As mentioned in the shared documentation.

Support for MLflow Projects in Azure Machine Learning will end on September 30, 2023.

To use the latest packages please refer to Azure Machine Learning Jobs as per recommendation.

RishabhM
  • 525
  • 1
  • 5
  • Thanks for the reply. weird that that shared documentation is the one I was working off. Can see it's been editted recently, maybe they've just added that warning in. Thanks for testing it all out and confirming it works with 1.25. – C.Holmes Jul 08 '23 at 16:01