Documentation preview for c3ecf40 will be available here when this CircleCI job completes successfully.
177 | global _tracking_store_registry | ||
178 | raise MlflowException( | ||
179 | f"Detected Unity Catalog tracking URI '{store_uri}'. " | ||
180 | f"Setting the tracking URI to a Unity Catalog backend is not supported in the current " |
f"Setting the tracking URI to a Unity Catalog backend is not supported in the current " | |
"Setting the tracking URI to a Unity Catalog backend is not supported in the current " |
Can we remove useless f-strings?
181 | f"version of the MLflow client ({VERSION}). " | ||
182 | f"Please specify a different tracking URI via mlflow.set_tracking_uri, with " | ||
183 | f"one of the supported schemes: " | ||
184 | f"{list(_tracking_store_registry._registry.keys())}. " |
The error message contains 'databricks-uc'
. Should we remove it if it's unsupported?
mlflow.exceptions.MlflowException: Detected Unity Catalog tracking URI 'databricks-uc'. Setting the tracking URI to a Unity Catalog backend is currently unsupported. Please specify a different tracking URI via mlflow.set_tracking_uri, with one of the following supported schemes: ['', 'file', 'databricks', 👉 'databricks-uc', 'http', 'https', 'postgresql', 'mysql', 'sqlite', 'mssql', 'file-plugin']. If you're trying to access models in the Unity Catalog, please upgrade to the latest version of the MLflow Python client, then specify a Unity Catalog model registry URI via mlflow.set_registry_uri('databricks-uc') or mlflow.set_registry_uri('databricks-uc://profile_name'), where 'profile_name' is the name of the Databricks CLI profile to use for authentication. Be sure to leave the tracking URI configured to use one of the supported schemes listed above.
Nice catch! Yes, good call
Verified after the latest commit that the message doesn't suggest "databricks-uc" as a supported scheme:
~/mlflow reserve-data…g-uri-scheme ❯ python Py base Py 3.8.13 09:01:08 PM
Python 3.8.13 (default, Jan 25 2023, 19:47:36)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mlflow; mlflow.set_tracking_uri("databricks-uc"); mlflow.log_param("a", "b")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/sid.murching/mlflow/mlflow/tracking/fluent.py", line 544, in log_param
run_id = _get_or_start_run().info.run_id
File "/Users/sid.murching/mlflow/mlflow/tracking/fluent.py", line 1552, in _get_or_start_run
return start_run()
File "/Users/sid.murching/mlflow/mlflow/tracking/fluent.py", line 278, in start_run
client = MlflowClient()
File "/Users/sid.murching/mlflow/mlflow/tracking/client.py", line 69, in __init__
self._tracking_client = TrackingServiceClient(final_tracking_uri)
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/client.py", line 51, in __init__
self.store
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/client.py", line 55, in store
return utils._get_store(self.tracking_uri)
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/utils.py", line 218, in _get_store
return _tracking_store_registry.get_store(store_uri, artifact_uri)
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/registry.py", line 39, in get_store
return self._get_store_with_resolved_uri(resolved_store_uri, artifact_uri)
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/registry.py", line 49, in _get_store_with_resolved_uri
return builder(store_uri=resolved_store_uri, artifact_uri=artifact_uri)
File "/Users/sid.murching/mlflow/mlflow/tracking/_tracking_service/utils.py", line 185, in _get_databricks_uc_rest_store
raise MlflowException(
mlflow.exceptions.MlflowException: Detected Unity Catalog tracking URI 'databricks-uc'. Setting the tracking URI to a Unity Catalog backend is not supported in the current version of the MLflow client (2.1.2.dev0). Please specify a different tracking URI via mlflow.set_tracking_uri, with one of the supported schemes: ['', 'file', 'databricks', 'http', 'https', 'postgresql', 'mysql', 'sqlite', 'mssql', 'file-plugin']. If you're trying to access models in the Unity Catalog, please upgrade to the latest version of the MLflow Python client, then specify a Unity Catalog model registry URI via mlflow.set_registry_uri('databricks-uc') or mlflow.set_registry_uri('databricks-uc://profile_name'), where 'profile_name' is the name of the Databricks CLI profile to use for authentication. Be sure to leave the tracking URI configured to use one of the supported schemes listed above.
LGTM once https://github.com/mlflow/mlflow/pull/7896/files#r1118288871 is addressed!
@smurching or @harupy I'm running into this error when trying to log to Unity Catalog from my laptop. Does this mean that UC logging is only supported from Databricks compute nodes and not externally? I've gathered from the documentation that UC is the recommended place to store models but I would then also like to do this externally.
@jswetzen good question, you should be able to access models in UC externally (curious if you can share more details about the use case for doing so). MLflow tracking in UC is not supported, but you can target models in UC for model registry using mlflow.set_registry_uri("databricks")
. Make sure to use the latest/a sufficiently-new version of the MLflow client (versions 2.4.1 and above should suffice), let me know if that works & thanks!
@smurching I didn't get the databricks extension running in VSCode yet, so I can't run remotely but would like to track my training in Databricks while developing.
I had mixed up set_tracking_uri
and set_registry_uri
and thought my problem when using databricks-uc
was local vs. Databricks execution instead of tracking vs. registry storage. Thanks for the swift clarification, I see now that there's feature parity when running locally.
Login to write a write a comment.
Related Issues/PRs
This PR is similar to #7863, but for the MLflow tracking client
#xxxWhat changes are proposed in this pull request?
Similarly to how #7863 reserved the
databricks-uc
URI scheme for the registry client, this PR reserves thedatabricks-uc
URI scheme for the MLflow tracking client, so that users see a better + more actionable error message if they callmlflow.set_tracking_uri("databricks-uc")
How is this patch tested?
Unit tests, also manually verified the updated error message.
Before this PR:
After this PR:
Does this PR change the documentation?
Release Notes
Is this a user-facing change?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingInterface
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportLanguage
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesIntegrations
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrationsHow should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes