fix: qlib backtests fail instantly under recent MLflow (filestore gated) - #1464
Open
chrisbatso wants to merge 1 commit into
Open
fix: qlib backtests fail instantly under recent MLflow (filestore gated)#1464chrisbatso wants to merge 1 commit into
chrisbatso wants to merge 1 commit into
Conversation
… env flag) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Recent MLflow releases put the filesystem tracking backend (
./mlruns) into maintenance mode and refuse to use it unlessMLFLOW_ALLOW_FILE_STORE=trueis set:The qlib Docker image (
rdagent/scenarios/qlib/docker/Dockerfile) installs MLflow unpinned as a qlib dependency, and qlib's recorder is built on the./mlrunsfilestore — so everyqruninside the container now dies within seconds. From the R&D loop's perspective the failure is quiet: therunningstep returns almost instantly with no result file, and every experiment is judged on a missing backtest.Fix
Set
ENV MLFLOW_ALLOW_FILE_STORE=truein the image. One line, no behavior change for older MLflow versions (the variable is simply ignored), restoresqrununder new ones.Testing
Reproduced with a freshly built image (Docker 29, image built 2026-08-29):
qrun conf_baseline.yamlraised the MlflowException immediately; after rebuilding with this ENV, baseline and combined-factor backtests complete andread_exp_res.pyextracts metrics and portfolio artifacts normally. Verified across multiple full 15-loopfin_factorruns.🤖 Generated with Claude Code
📚 Documentation preview 📚: https://RDAgent--1464.org.readthedocs.build/en/1464/