chore: merge enable parallel (#1093)

* chore: merge enable parallel
This commit is contained in:
Tim
2025-07-21 14:28:36 +08:00
committed by GitHub
parent c326aa52b9
commit 68f961407e
@@ -83,7 +83,7 @@ class ParallelMultiTraceExpGen(ExpGen):
else:
# enter the merging stage
# make sure the all loops are finished
if loop.get_unfinished_loop_cnt(loop.loop_idx) < 1:
if loop.get_unfinished_loop_cnt(loop.loop_idx) < RD_AGENT_SETTINGS.get_max_parallel():
# disable reset in merging stage
DS_RD_SETTING.coding_fail_reanalyze_threshold = 100000
DS_RD_SETTING.consecutive_errors = 100000
@@ -93,13 +93,15 @@ class ParallelMultiTraceExpGen(ExpGen):
trace.set_current_selection(selection=(-1,))
return self.exp_gen.gen(trace)
else:
selection = (leaves[0],)
local_selection = (leaves[0],)
if trace.sota_exp_to_submit is not None:
for i in range(1, len(leaves)):
if trace.is_parent(trace.exp2idx(trace.sota_exp_to_submit), leaves[i]):
selection = (leaves[i],)
local_selection = (leaves[i],)
break
trace.set_current_selection(selection)
return self.merge_exp_gen.gen(trace)
trace.set_current_selection(local_selection)
exp = self.merge_exp_gen.gen(trace)
exp.set_local_selection(local_selection)
return exp
await asyncio.sleep(1)