← Back to Pull requests

fix(config): apply walk/broadcast to nested configs once per call #642

Closed
unknown closed this pull request without merging on Oct 07, 2026 22:26 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 00:14 UTC
Author

What changed


  • dedent the child-config recursion in _try_set_all out of the for key, val in kwargs.items() loop, so nested configs are visited once per walk() / broadcast() call

  • add TestPartial.test_walk_multiple_keys and test_walk_multiple_keys_two_levels_down
  • Why


    The recursion into child Config/Partial objects sat inside the per-key loop, so each child was processed once for every key passed. Every recursive call applies all keys again, so with walk() the transforms ran several times on nested configs:

    partial.walk(seq_length=lambda c: c.seq_length * 2, hidden=lambda c: c.hidden + 1)
    # nested model: seq_length 40, hidden 102  (expected 20, 101)
    

    A single key was fine, which is why the existing test_walk passed. broadcast() gave the right values (setting a constant twice is harmless) but did the extra work.

    Checks


  • pytest test/test_config.py: 54 passed; on main the new tests fail with assert 40 == 20 and, two levels down, assert 'x!!!!' == 'x!'

  • ruff format --check nemo_run/config.py test/test_config.py
  • Diff: 135 lines (+101 / -34) across 1 files Reviewer: CodersAcademy006 Review duration: 1332m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.56) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.56 · 135 lines diff across 1 files
    0.56
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.294
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.056
    Real PR Conversation Timeline
    1 comments
    "Review active on #642"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.6% (MEDIUM) · Higher = larger blast radius
    55.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24% · Safe to merge
    24%