[Bug] pyqlib 0.9.7 installs with unbounded mlflow; R.start() raises MlflowException on fresh environments
Bug Description
A fresh pip install pyqlib (0.9.7, the current release) resolves to the latest mlflow, whose filesystem tracking backend now refuses to start by default. qlib.init(...) succeeds, but the first R.start(...) raises:
mlflow.exceptions.MlflowException: The filesystem tracking backend (e.g., './mlruns') is in maintenance mode and will not receive further updates. Please migrate to a database backend (e.g., 'sqlite:///mlflow.db') to access the latest MLflow features. ... If the filesystem backend is required for your workflow, set MLFLOW_ALLOW_FILE_STORE=true to opt out of this exception.
Reproduce
python -m venv .venv && .venv/Scripts/python -m pip install pyqlib # pulls mlflow >= 3.13
import qlib
qlib.init(provider_uri="~/.qlib/qlib_data/cn_data", region="cn")
from qlib.workflow import R
with R.start(experiment_name="repro"):
R.log_metrics(m1=1.0)
- Environment: Windows 11, Python 3.12.10, pyqlib 0.9.7 (PyPI wheel), mlflow as resolved by pip today.
Expected Behavior
The published release either constrains mlflow to a compatible range or works out of the box with the resolved version.
Additional Notes
mainalready pinsmlflow<3.13inpyproject.toml(with a comment in.github/ci/constraints.txt: "Qlib still uses MLflow's filesystem tracking backend"), and CI setsMLFLOW_ALLOW_FILE_STORE=true— but that bound has not shipped in a release, so 0.9.7 users get the incompatible version with no documented env var.- Possible remedies: ship a 0.9.8 with the
mlflow<3.13bound (release-level fix), and/or setos.environ.setdefault("MLFLOW_ALLOW_FILE_STORE", "true")before importing mlflow inqlib.workflowso the default recorder works regardless of the installed mlflow version.
🤖 Generated with Claude Code
Hi! I submitted a fix in #2399 that complements the dependency constraint in pyproject.toml by also setting os.environ.setdefault('MLFLOW_ALLOW_FILE_STORE', 'true') in qlib.workflow before constructing MlflowClient instances (matching the CI workflow environment default while preserving any explicit user override).