cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Mlflow Import error

adithyasanker
New Contributor II

I am trying to deploy the latest mlFlow registry Model to Azure ML by following the article: https://www.databricks.com/notebooks/mlops/deploy_azure_ml_model_.html

But during the import process at cmd:6 . I am getting an error ModulenotFoundError No module named 'mlflow.azureml'. I have installed all the libraries. What am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @adithyasanker , 

The error "ModuleNotFoundError: No module named 'mlflow.azureml'" means that the mlflow.azureml module is not installed on your system.

You can install the mlflow[azureml] package to access the mlflow.azureml module using the following command in a new notebook cell or command line interface (CLI):

!pip install mlflow[azureml]

Once the installation is complete, try rerunning the import statement.

If you already have the mlflow package installed, you need to ensure that you have the correct version compatible with the mlflow.azureml module. You can check the compatibility information in the mlflow[azureml] package documentation.

For example, if you have installed a version  mlflow older than 1.11.0, you might not have the mlflow.azureml module. Instead, you can install an older version of the package that includes the Azure ML integration:

!pip install mlflow[azureml]~=1.10.0

Additionally, you might need to restart the kernel in your notebook after installing these packages to ensure that the changes take effect.

View solution in original post

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @adithyasanker , 

The error "ModuleNotFoundError: No module named 'mlflow.azureml'" means that the mlflow.azureml module is not installed on your system.

You can install the mlflow[azureml] package to access the mlflow.azureml module using the following command in a new notebook cell or command line interface (CLI):

!pip install mlflow[azureml]

Once the installation is complete, try rerunning the import statement.

If you already have the mlflow package installed, you need to ensure that you have the correct version compatible with the mlflow.azureml module. You can check the compatibility information in the mlflow[azureml] package documentation.

For example, if you have installed a version  mlflow older than 1.11.0, you might not have the mlflow.azureml module. Instead, you can install an older version of the package that includes the Azure ML integration:

!pip install mlflow[azureml]~=1.10.0

Additionally, you might need to restart the kernel in your notebook after installing these packages to ensure that the changes take effect.

adithyasanker
New Contributor II

@Kaniz_Fatma Thank you, that solved the issue.

But on proceeding with the execution, at the build image step, I faced another issue.

''TypeError: join() argument must be str, bytes, or os.PathLike object, not 'dict''' .
The model is registered successfully in azureml but the docker image creation fails. I'm using the Spark 12.2 LTS ML Compute.
Could this be an ml flow version issue?
Appreciate your help. Thanks!
Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!