Skip to content

Remove MLflow 2.x scaffolding left behind by the mlflow>=3.13 floor #1508

Description

@vb-dbrks

Raising the mlflow[databricks] floor to >=3.13.0 (in #1489, to pick up mlflow/mlflow#20599) left two
pieces of scaffolding behind that no supported version needs any more. Both are small and self-contained.

1. The artifact_path= fallback in log_sklearn_model_compatible is dead

src/databricks/labs/dqx/anomaly/mlflow_registry.py inspects mlflow.sklearn.log_model and prefers
name= when the signature offers it, falling back to artifact_path= when it does not. MLflow 3.x accepts
both, so the name= branch is always taken and the fallback is unreachable on any version the floor admits.

Worth keeping the helper's shape if it is doing other work, but the dead branch and its comment can go.

2. The dummy Databricks config profile fixture is probably removable

tests/integration_anomaly/conftest.py::_ensure_databricks_config_file writes a config profile with
token = dummy purely to work around mlflow/mlflow#20599, which the new floor contains.

This one cannot be settled from CI: CI always supplies real credentials, so the branch never runs there.
Deleting it needs one make anomaly run against a workspace to confirm. The fixture's docstring already
records this. Note the trap while you are in there, because it costs an hour if you hit it cold: with
DATABRICKS_CONFIG_FILE unset, that token = dummy makes every test in the suite fail with
PermissionDenied: Invalid access token, which reads like an expired token rather than like a fixture.

Verification

make fmt, .venv/bin/pytest tests/unit -q, and for item 2, make anomaly against a workspace (note:
make anomaly, not make anomaly -n 4 -- -n is make's dry-run flag and silently runs nothing).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DQX CoreFeature/Bug Related to DQX Core functionalitygood first issueGood for newcomers or if you are looking at a small ticket

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions