You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spawn resume: relaunched params are recorded by position in the pending list, not their parameter index (and TotalParams shrinks) #1248
Found while reviewing #1234 (resume region fix). Confirmed by reading origin/main; not reproduced on AWS.
The bug:
spawn resume builds launch configs only for the pending parameter indices (cmd/resume.go, the for _, idx := range pending loop). It then calls launchWithRollingQueue(ctx, …, launchConfigs, …).
That function writes the sweep state from scratch (cmd/launch_sweep.go ~650–670):
TotalParams: len(launchConfigs) is the size of the pending subset, not the sweep's size.
Each instance is recorded as Index: i, its position in the subset, not the parameter index it was launched for.
Example: resume a 10-parameter sweep where params 3 and 7 are pending. The new state says TotalParams=2, with instances at Index 0 and 1.
Consequences:
A second spawn resume (or status) reads that state, believes parameters 0 and 1 ran and the others are unknown or pending.
It can therefore relaunch parameters that already completed, which is a duplicate-compute cost, and it loses the record of 3 and 7.
The sweep's progress counts are wrong after any resume.
Fix:
Pass each pending config's real parameter index through to the recorder, e.g. a parallel []int of indices, or an Index field on the launch config.
On resume, merge into the existing state instead of overwriting it, keeping the completed and running instances and the original TotalParams.
Gate:
Resume a sweep state with completed {0,1,2,4,5,6,8,9} and pending {3,7}.
After the relaunch the state must still have TotalParams=10, and must record the new instances at Index 3 and 7.
Activity
fix(resume): record relaunched params by parameter index and merge in…
fix(resume): record relaunched params by parameter index and merge in…