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).
Raising the
mlflow[databricks]floor to>=3.13.0(in #1489, to pick up mlflow/mlflow#20599) left twopieces of scaffolding behind that no supported version needs any more. Both are small and self-contained.
1. The
artifact_path=fallback inlog_sklearn_model_compatibleis deadsrc/databricks/labs/dqx/anomaly/mlflow_registry.pyinspectsmlflow.sklearn.log_modeland prefersname=when the signature offers it, falling back toartifact_path=when it does not. MLflow 3.x acceptsboth, 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_filewrites a config profile withtoken = dummypurely 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 anomalyrun against a workspace to confirm. The fixture's docstring alreadyrecords this. Note the trap while you are in there, because it costs an hour if you hit it cold: with
DATABRICKS_CONFIG_FILEunset, thattoken = dummymakes every test in the suite fail withPermissionDenied: 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 anomalyagainst a workspace (note:make anomaly, notmake anomaly -n 4---nis make's dry-run flag and silently runs nothing).