@@ -110,7 +110,8 @@ def run_queue(args, requests, ready, plan_path):
110110 or prior ['frozen_selection_sha256' ] != selection_hash ):
111111 raise ValueError ('Existing CPU schedule differs' )
112112 report = {'status' : 'running' , 'phase' : args .phase , 'environment' : environment (),
113- 'requests' : requests , 'complete' : [], 'failures' : prior .get ('failures' , []),
113+ 'requests' : requests , 'complete' : [], 'failures' : [],
114+ 'previous_failures' : prior .get ('previous_failures' , []) + prior .get ('failures' , []),
114115 'workers' : plan ['workers' ], 'workers_per_physical_core' : 1 ,
115116 'cpu_parallel_plan_sha256' : plan_hash , 'cpu_parallel_plan' : str (plan_path ),
116117 'model_lanes' : plan ['model_lanes' ][args .phase ], 'lanes' : plan ['lanes' ],
@@ -242,7 +243,14 @@ def main():
242243 parser .add_argument ('--index' , choices = ('datrie' , 'hash' ), default = 'datrie' )
243244 parser .add_argument ('--requests' , type = int , default = 32 )
244245 args = parser .parse_args ()
245- if args .output .exists () or os .environ .get ('CUDA_VISIBLE_DEVICES' ) != '' :
246+ if os .environ .get ('CUDA_VISIBLE_DEVICES' ) != '' :
247+ parser .error ('Empty CUDA_VISIBLE_DEVICES required' )
248+ # A reference coordinator can finish between the dispatcher's existence
249+ # check and this CLI starting. Consume its verified output before enforcing
250+ # the fresh-output requirement that applies to numerical workers.
251+ from .cpu_parallel_references import wait_for_reference
252+ if wait_for_reference (args ):return
253+ if args .output .exists ():
246254 parser .error ('Fresh output and empty CUDA_VISIBLE_DEVICES required' )
247255 from .cpu_fork_serving import submit
248256 if submit (args ):return
0 commit comments