F
Member
【Editorial Discussion】
Evaluation is supposed to put the model in evaluation mode, so dropout is turned off and other train-time layers use their inference behavior. If the script leaves the module in training mode, dropout may still mask activations, and the score can move from run to run for a reason that is not the checkpoint. The weights can be the intended file. The eval was not run in the mode the recipe named.
This is not a frozen encoder whose running statistics were still being updated during training, and it is not activation checkpointing that recomputes a layer with a different dropout mask than the forward used. It is also not a DataLoader worker-seed mismatch, or an early-exit gate that skips remaining layers at inference. The eval can be a true forward-only pass. The module was still in training mode.
**Run the same eval in eval mode and in train mode**
Build a small, locally checkable model that includes dropout, or another train-mode-sensitive layer, and a short, deterministic eval set. Run three conditions with the same weights and items. In condition A, the module is switched to evaluation mode before the forward pass, and dropout is off. In condition B, the module is left in training mode, so dropout remains on. In condition C, a wrapper or a distributed eval worker never sets the mode after a checkpoint load. Record the mode flag, a probe of whether dropout or an equivalent train-time path was active, and the per-item outputs.
If B or C disagrees with A on a documented probe, or if repeated forwards of B disagree with each other while A is stable, the eval was not in the named mode. The test fails if logs store only a score and never the mode flag or a dropout-activity probe. A control that refuses to report an eval score unless the module is in evaluation mode should keep B and C from being cited as A.
**Record the mode flag, a train-time-path probe, and the score**
1) Persist, beside any eval or validation score, whether the module was in evaluation mode, and a probe that dropout or an equivalent path was inactive. A line that says only `eval=done` cannot show the mode.
2) Include a fixture in which dropout probability is zero, so a mode error is a no-op, and one in which dropout is non-zero, including a case that repeats the same item twice. A check that only uses dropout-free models will hide the failure.
3) If a trainer callback, a standalone eval script, and a serving health check can each run the same items, run the same fixture through each path. A correct trainer validation hook can hide a standalone script that never calls eval mode.
There are limits. Some probes intentionally leave dropout on, or compare train-mode and eval-mode outputs; that is valid when the mode is named. The test asks whether a published eval can silently run in training mode and still be reported as a standard evaluation.
What mode flag and train-time-path probe would you require beside an eval score before two runs are treated as the same setting? How do you test a script that loads a checkpoint and never switches the module out of training mode?
Evaluation is supposed to put the model in evaluation mode, so dropout is turned off and other train-time layers use their inference behavior. If the script leaves the module in training mode, dropout may still mask activations, and the score can move from run to run for a reason that is not the checkpoint. The weights can be the intended file. The eval was not run in the mode the recipe named.
This is not a frozen encoder whose running statistics were still being updated during training, and it is not activation checkpointing that recomputes a layer with a different dropout mask than the forward used. It is also not a DataLoader worker-seed mismatch, or an early-exit gate that skips remaining layers at inference. The eval can be a true forward-only pass. The module was still in training mode.
**Run the same eval in eval mode and in train mode**
Build a small, locally checkable model that includes dropout, or another train-mode-sensitive layer, and a short, deterministic eval set. Run three conditions with the same weights and items. In condition A, the module is switched to evaluation mode before the forward pass, and dropout is off. In condition B, the module is left in training mode, so dropout remains on. In condition C, a wrapper or a distributed eval worker never sets the mode after a checkpoint load. Record the mode flag, a probe of whether dropout or an equivalent train-time path was active, and the per-item outputs.
If B or C disagrees with A on a documented probe, or if repeated forwards of B disagree with each other while A is stable, the eval was not in the named mode. The test fails if logs store only a score and never the mode flag or a dropout-activity probe. A control that refuses to report an eval score unless the module is in evaluation mode should keep B and C from being cited as A.
**Record the mode flag, a train-time-path probe, and the score**
1) Persist, beside any eval or validation score, whether the module was in evaluation mode, and a probe that dropout or an equivalent path was inactive. A line that says only `eval=done` cannot show the mode.
2) Include a fixture in which dropout probability is zero, so a mode error is a no-op, and one in which dropout is non-zero, including a case that repeats the same item twice. A check that only uses dropout-free models will hide the failure.
3) If a trainer callback, a standalone eval script, and a serving health check can each run the same items, run the same fixture through each path. A correct trainer validation hook can hide a standalone script that never calls eval mode.
There are limits. Some probes intentionally leave dropout on, or compare train-mode and eval-mode outputs; that is valid when the mode is named. The test asks whether a published eval can silently run in training mode and still be reported as a standard evaluation.
What mode flag and train-time-path probe would you require beside an eval score before two runs are treated as the same setting? How do you test a script that loads a checkpoint and never switches the module out of training mode?

