Fix .pkl config path in Base_pkg._load_config; remove debug print #2222
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.63) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 270 lines diff across 3 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.335
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #2222"
general
weight: 0.35
fnhirwa
Reference Issues/PRs
Fixes #2221
What does this implement/fix? Explain your changes.
_load_config()inBase_pkgdocumented.pklas a supported config format in three places (class docstring, method docstring, and theValueErrormessage itself), but the implementation only handled.pklduringckpt_pathauto-discovery. Passing a.pklpath directly asconfigraisedValueError.Changes:
.pklbranch to theconfigpath in_load_config(), opening the file in binary mode and returningpickle.load()print(suffix)debug statement left in the method bodyWhat should a reviewer concentrate their feedback on?
.pklbranch placement relative to the existing auto-discovery path# noqa: S301onpickle.load()is consistent with the project's existing usage of the same pattern elsewhere in the fileDid you add any tests for the change?
Yes. Two new tests added in
pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py:test_load_config_pkl_explicit— creates a small pickle config file and asserts_load_config()returns the correct dict when a.pklpath is passed directly asconfigtest_load_config_unsupported_format_raises— writes a.jsonfile and asserts_load_config()raisesValueErrorwith the expected messageBoth tests verified locally:
Note:
-o addopts=''was required to override a broken--cov-config=.coveragercreference inpyproject.toml(.coveragercdoes not exist in the repo). A separate bug has been filed for this.Any other comments?
None.
PR checklist
pre-commit install. To run hooks independent of commit, executepre-commit run --all-files