[BUG] Fix logging_metrics device mismatch in BaseModelV2 #2205
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 163 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.305
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2205"
general
weight: 0.35
fnhirwa
Reference Issues/PRs
Fixes #2197
What does this implement/fix? Explain your changes.
Wraps logging_metrics in nn.ModuleList in
BaseModelV2.__init__so metrics are registered as submodules and move with the model on.to()calls. 
What should a reviewer concentrate their feedback on?
-The two regression tests in test_base_model_v2.py,
-Whether iterating
metric._defaultsto reach torchmetrics state tensors is acceptable, or if there's a cleaner public API to assert device propagation without a GPU?Did you add any tests for the change?
Yes,
tests/test_models/test_base_model_v2.py(new file):test_logging_metrics_is_module_listthis asserts the container type directlytest_logging_metrics_device_propagationthis moves the model totorch.device("meta")and checks that metric state tensors follow. This catches the bug on CPU-only CI since.to("meta")is a real device move unlike.to("cpu")which is a no-op when already on CPU. 
Any other comments?
Tests use DLinear with a minimal metadata dict, no dataloader or trainer needed.
PR checklist