Skip to content

Fix MLflow autologged model reload fitted-state detection#1573

Open
thinkall with Copilot wants to merge 5 commits into
mainfrom
copilot/bugfix-mlflow-unfitted-pipeline
Open

Fix MLflow autologged model reload fitted-state detection#1573
thinkall with Copilot wants to merge 5 commits into
mainfrom
copilot/bugfix-mlflow-unfitted-pipeline

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Recent scikit-learn versions treat MLflow-reloaded FLAML pipelines as unfitted because FLAML estimator wrappers do not expose their fitted state through sklearn’s protocol. Consequently, loaded.predict() raises NotFittedError.

  • Estimator compatibility

    • Implement __sklearn_is_fitted__() based on FLAML’s underlying _model state.
    • Preserve the existing MLflow sklearn pipeline artifact format.
  • Regression coverage

    • Log and reload an autologged FLAML model through runs:/{run_id}/model.
    • Verify sklearn recognizes the pipeline as fitted and its predictions match AutoML.
loaded = mlflow.sklearn.load_model(f"runs:/{run_id}/model")
loaded.predict(X_test)

Copilot AI changed the title [WIP] Fix MLflow autolog'd FLAML model reload issue Fix MLflow autologged model reload fitted-state detection Jul 16, 2026
Copilot AI requested a review from thinkall July 16, 2026 02:07
@thinkall thinkall marked this pull request as ready for review July 16, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MLflow-autolog'd FLAML model reloads as unfitted Pipeline via mlflow.sklearn.load_model

2 participants