Repository navigation
Commit 0854adc
committed
replay_base: direct-evidence logs for R3 wrapper + overlap check
The previous --enable-r3-correctness-check flag turned on the overlap
check but produced no log output unless an actual mismatch happened,
making it impossible to distinguish "check passed" from "check never
ran." Add two unconditional logs gated on enable_check_replay_result:
1. get_topk_fn / new_topk_fn replay_forward + replay_backward branches:
log when the wrapper actually returns replay indices rather than
falling through to old_topk_fn. Direct evidence megatron's MoE
forward used the rollout indices (vs recomputing them).
2. check_replay_result: log n_tokens and mismatch_count on every call,
including the mismatch_count==0 case (which previously returned
silently). Direct evidence the check ran, plus the actual overlap
number for cross-step / cross-rank comparison.
Both logs gated on enable_check_replay_result so production training
runs (which leave it False) stay quiet. Adds no overhead when off.
Intended to make the LLM360/RL360 R3 regression E2E able to assert
directly that R3 worked end-to-end, rather than inferring from absence
of failure messages.1 parent db437d2 commit 0854adc
1 file changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
155 | 169 | | |
156 | 170 | | |
157 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
158 | 180 | | |
159 | 181 | | |
160 | 182 | | |
| |||
196 | 218 | | |
197 | 219 | | |
198 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
199 | 230 | | |
200 | 231 | | |
201 | 232 | | |
| |||
0 commit comments