Skip registering sqlalchemy store when sqlalchemy lib is not installed#19563
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds conditional registration of SQLAlchemy stores based on whether the sqlalchemy library is installed. This is necessary because sqlalchemy is not a requirement for mlflow-skinny and is not pre-installed in Databricks runtime environments.
Key changes:
- Added import checks for
sqlalchemybefore registering database engine schemes - Applied the same pattern in both tracking service and model registry utilities
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| mlflow/tracking/_tracking_service/utils.py | Added conditional check for sqlalchemy availability before registering database engine schemes in tracking store registry |
| mlflow/tracking/_model_registry/utils.py | Added conditional check for sqlalchemy availability before registering database engine schemes in model registry store registry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Documentation preview for 77df71d is available at: More info
|
|
What's the context of this change? Did users see any exception when using |
TomeHirata
left a comment
There was a problem hiding this comment.
Change LGTM, can you add skinny-test?
Yes. |
Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
mlflow#19563) Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
#19563) Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
mlflow#19563) Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Skip registering sqlalchemy store when sqlalchemy lib is not installed
sqlalchemyis not a requirement formlflow-skinny, and in databricks runtime,sqlalchemyis not preinstalled.How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" 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 notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.