cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
cancel
Showing results for 
Search instead for 
Did you mean: 

MLFlow error

gar
New Contributor II

I am running into an error within the Databricks notebook (on Databricks website) environment where MLFlow will not load:

MLflow autologging encountered a warning: "/databricks/python/lib/python3.8/site-packages/mlflow/utils/autologging_utils/safety.py:216: UserWarning: Logging to MLflow failed: You haven't configured the CLI yet! Please configure by entering

/databricks/python_shell/scripts/PythonShell.py configure

 

I then try to run the command in a cell (and in the web terminal) :

!/databricks/python_shell/scripts/PythonShell.py configure

And get the following error output:

/databricks/python_shell/scripts/PythonShell.py: line 22: syntax error near unexpected token `'AGG''

I have tried editing this file from the Web Terminal with vi but nothing seems to work.

1 ACCEPTED SOLUTION

Accepted Solutions

sean_owen
Honored Contributor II
Honored Contributor II

There aren't different versions of mlflow, but without %pip install you are only installing on the driver machine. You do need %pip to even get it on the workers, which could be the issue.

View solution in original post

9 REPLIES 9

sean_owen
Honored Contributor II
Honored Contributor II

How are you running this? This generally means you're not running a Databricks ML runtime, which should be all set up with auth, etc

Anonymous
Not applicable

Hi,

I am having the same issue when trying to run an MLFlor experiment with :

mlflow run git-uri -b databricks --backend-config cluster-spec.json experiment-name mlflow_expetiment

The error is caused by:

mlflow.set_tracking_uri('databricks')

The error is the following:

databricks_cli.utils.InvalidConfigurationError: You haven't configured the CLI yet! Please configure by entering `/opt/project/mlflow_test.py configure`

The databricks-cli is configured properly and works fine outside the script.

sean_owen
Honored Contributor II
Honored Contributor II

Have you tried running that script it indicates? something is not quite connected here

Anonymous
Not applicable

Hi,

Yes​ I have tried but I get the error that the script doesn't have a "configure" argument. Looking deeper into the code that reises the error, I see that this is a string automatically generated by inserting the name of the running script when the Databricks credentials are not properly fetch within python. But I don't know how I can pass this credentials that I have already pass to the databricks-cli (token, host, etc)

erocoar
New Contributor II

I get the error when I run `!pip install mlflow` instead of `%pip install mlflow`, which I assume installs the databricks-maintained version

sean_owen
Honored Contributor II
Honored Contributor II

There aren't different versions of mlflow, but without %pip install you are only installing on the driver machine. You do need %pip to even get it on the workers, which could be the issue.

sj2812
New Contributor II

step1 - !pip install mlfow , step2- mlflow.set_tracking_uri('databricks'), step3- restart the cluster

sean_owen
Honored Contributor II
Honored Contributor II

Do not use !pip. This installs on the driver only. Use %pip. However, you do not need to install MLflow. Use the ML runtime. Otherwise you also have to configure MLflow.

Will1
New Contributor III

Install the Databricks SQL Connector for Python library on your development machine by running pip install databricks-sql-connector .

  1. Query data.
  2. Insert data.
  3. Query metadata.
  4. Cursor and connection management.
  5. Configure logging.

Regards,

Willjoe

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.