Repository navigation
test(train): Serialize Nova serverless integ jobs - #6387
Conversation
Nova serverless fine-tuning jobs (nova-textgeneration-lite-v2 SFT, SFT data mixing, RLVR) run on a shared p5 pool that customers also use, and each job takes 4 p5 instances. The deep integ suite runs under pytest-xdist, so these three tests submitted their jobs at the same time and could occupy most of the pool, leaving no capacity for customer jobs. Add tests/integ/train/nova_capacity.py: - nova_capacity_slot(): a cross-worker file lock so at most one Nova serverless job per test run is in flight, held until the job is terminal. - wait_for_nova_training_job(): replaces the hand-rolled poll loops. It stops the job and skips the test if the job is still waiting for instances after 60 minutes, and stops the job whenever the wait ends with the job still running, so no orphaned job keeps queueing for capacity.
|
Claude finished @lucasjia-aws's task in 2m 1s —— View job Review — PR #6387: Serialize Nova serverless integ jobs
Overall this is a clean, test-only change that solves a real resource-contention problem (3 Nova SFT/RLVR jobs × 4 p5 instances firing simultaneously under xdist). The helper is well documented, the 1. Lock is released before the stopped job is actually terminal ( 2. A transient 3. 4. Nits (non-blocking)
|
Summary
The Nova model training team reported that our deep integ tests in account 784379639078 (us-east-1) occupy most of the shared Nova p5 pool. Each
nova-textgeneration-lite-v2serverless SFT/RLVR job needs 4 p5 instances, and because the deep suite runs under pytest-xdist, the SFT, SFT data-mixing and RLVR tests submit their jobs at the same moment. With ~11 p5 available, our tests held 8, which left no room for a customer job. The training team's ask was that these jobs not run at the same time.CI history shows the same contention: across 127 batches of three simultaneously submitted Nova jobs since August, all three started within 15 minutes in only 30 batches; in the rest one or more waited for another to finish, or for the pool to free up.
Changes
tests/integ/train/nova_capacity.py:nova_capacity_slot()reusestests/integ/lock.pyto serialize Nova serverless jobs across all xdist workers of a run. The slot is held from submission until the job is terminal, and is released automatically if the process dies.wait_for_nova_training_job()replaces the hand-rolled poll loops. If the job is stillStarting/Pendingafter 60 minutes, it stops the job and skips the test, so we give capacity back instead of queueing behind customers. It also stops the job whenever the wait ends with the job non-terminal (timeout, error, interrupt), so killed or failed tests do not leave orphaned jobs that start training hours later.test_sft_trainer_nova_workflow,test_sft_trainer_nova_lite2_with_data_mixingandtest_rlvr_trainer_nova_workflownow submit and wait inside the slot. Assertions are unchanged.Testing
black --check(26.3.1) andflake8(7.1.2) pass on the changed files.pytest --collect-only -m "gpu_intensive and us_east_1"collects the three tests.Notes