Repository navigation
fix(tests): hold the parent watcher to its time from its own start - #125
Draft
mahdi-shafiei wants to merge 1 commit into
Draft
mahdi-shafiei wants to merge 1 commit into
mahdi-shafiei wants to merge 1 commit into
Conversation
test_a_training_process_dying_as_its_workers_start_leaves_none required every worker gone 2 s after its training process died. A worker still starting at that moment ends only once its set-up starts the watcher, after its spawn, imports and unpickling, and that time grows with load. On 24 CPUs it took 1.4-1.6 s at a load average near 12 and 1.7-3.3 s with 24 busy processes added, so [0] failed under load (a worker alive after 2 s) while every worker ended within 30 s. A worker now records when its watcher starts (TimedSetUp, beside UnwatchedSetUp), and each must be gone within 2 s of the later of the death and that start, and end within 30 s, the wait Grain's test of its own watcher uses (google/grain#1475). The 2 s bound is unchanged. A watcher planted 3 s late fails all four cases; the parent-watcher tests pass beside 24 busy processes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A worker still starting when its training process dies ends only once its set-up starts the parent watcher, after its spawn, imports and unpickling. That time grows with load, and the old test charged it to the watcher's 2 s. The 2 s bound is unchanged; only what it measures from changed. Test-only.
Evidence
[0]failed with{'alive': [3014490], 'gone_after': None}at a load average near 24. A probe of the test's own harness with a 30 s window, delay 0, on 24 CPUs: every worker ended; 1.44-1.60 s after the death at a load average near 12, and 1.71-3.33 s with 24 busy processes added (5 of 6 over 2 s).TestTheParentWatcher8 passed with 24 busy processes added (load average 28.7). Watchers started 0.70-1.69 s after the death, and each worker exited within 0.007 s of its watcher's start.test_host_worker_setup.pyandtest_materialize_crashes.py: 33 passed.Merge Danger
Door: two-way
Blast Radius: tests only (
tests/pipeline/test_host_worker_setup.py,tests/test_common/worker_reads.py, CHANGELOG).