Separate learner model inputs from model state #12443
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 233 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12443"
general
weight: 0.35
RAMitchell
Summary
LearnerModelParamtoLearnerModelStateto reflect that it is authoritative runtime/model state rather than a user parameter objectbase_score,num_class,num_target, andboost_from_average) intoLearnerTrainParamGradientBooster::ModelFitted()as a proxy for learner initializationThe serialized
learner_model_paramkey remains unchanged for model compatibility. Loading older snapshots also restores pending model inputs from that object when they are absent fromlearner_train_param.This PR intentionally retains
need_configuration_and the existing deferred component-configuration calls. It separates model initialization from that state machine first; configuration lifecycle cleanup can follow independently.Why
LearnerModelParammixed user-provided construction inputs with model-derived, authoritative state. That made ordinary configuration responsible for creating a provisional model before training data was available and required booster internals to report whether the learner had been fitted. Separating the two lets configuration remain parameter handling while the first training operation creates a valid model state from both parameters and data.Validation
./build/testxgboost(750 tests)pytest tests/python/test_basic_models.py tests/python/test_pickling.py tests/python/test_model_io.py tests/python/test_model_compatibility.py tests/python/test_multi_target.py(61 passed, 1 skipped)pre-commit run --files <34 changed files>