training_reduces_loss_and_is_seeded_deterministic failed once in a full workspace run #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How it was found: running
cargo test --release --workspaceon branch feature/model-v1.1 (hermes, other CPU load from an unrelated build running at the time).omnia-trainingtesttraining_reduces_loss_and_is_seeded_deterministicpanicked atcrates/omnia-training/tests/training.rs:96(the seeded-runs-diverged assertion).What happens: the test did not reproduce. It passed alone, in 3 further runs of the
trainingtest file, and in a second full workspace run.Confidence: that the failure happened is certain; the cause is not diagnosed. Roughly 55% that this is pre-existing flakiness, because the v1.1 changes leave the v1 numeric path untouched (new modules are
None, the cat mask is skipped), and the test compares two runs with a 1e-4 tolerance. My guess is the data-parallel gradient summation order in ndarray under CPU contention, which is also not bit-deterministic (the same effect is noted for Novacana's trainer). I did not run the test against the base commit repeatedly.Suggested fix: loop the test 50 times under artificial load on the base commit to confirm it is pre-existing, then loosen the tolerance or make the reduction order deterministic.
Reproduced the seeded divergence and the lock patch removes it under the same soak. Unpatched release binary, --test-threads=16, eight sha256sum /dev/zero loops: 54 pass / 1 fail in 55 runs (training.rs:96, 2.0957823 vs 2.1332889). Patched: 47 pass / 0 fail in 47 runs. Tolerance 1e-4 unchanged.
PR: #31
Head:
9561c6bd4cCard left in doing for independent review. Not merged.