Default nnx.EMA to Variables with inexact values #5603
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 149 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.300
Real PR Conversation Timeline
1 comments
"Review active on #5603"
general
weight: 0.35
Arthur031221
What does this PR do?
Fixes #5601.
nnx.EMAnow defaults to tracking Variables with floating-point or complex values. This leaves out the RNG keys and counts used bynnx.Dropout, integer counters, boolean state, and Variables whose values are not arrays. It continues to track floating-point parameters and batch statistics. Callers that pass an explicitonlyfilter keep that filter.The previous default selected the Dropout RNG key and failed on the first EMA update. Excluding only RNG state still averaged integer Variables and cast the result back to integer state. With this change, the model's integer step counter stays shared in the EMA view rather than being averaged.
The regression test calls Dropout and updates the EMA in the same
nnx.jitstep. It checks the selected paths, averaged floating-point values, and shared RNG count, integer counter, and boolean flag. A second test covers a Variable containing a tuple. Both focused tests passed on the updated branch withJAX_PLATFORMS=cpu.Checklist