fix: handle the no-update case of root node in uncommited_rec_status (#1062)

* fix: improve scheduler API (suggest_sel) and add timer.remain_time()

* chore: exclude .venv from auto-black and auto-isort tasks

* refactor: wrap RoundRobinScheduler commit and selection in retry loop

* set search_type="ancestors" for experiment_and_feedback_list_after_init

* fix bug:  no update of uncommited_rec_status with root node

---------

Co-authored-by: Young <afe.young@gmail.com>
This commit is contained in:
xuangu-fang
2025-07-11 17:13:00 +08:00
committed by GitHub
parent c1834c634e
commit be9490f417
@@ -56,8 +56,13 @@ class RoundRobinScheduler(TraceScheduler):
while True:
# step 0: Commit the pending selections
for i in range(self.rec_commit_idx, len(trace.dag_parent)):
for p in trace.dag_parent[i]:
self.uncommited_rec_status[p] -= 1
if trace.dag_parent[i] == trace.NEW_ROOT:
self.uncommited_rec_status[trace.NEW_ROOT] -= 1
else:
for p in trace.dag_parent[i]:
self.uncommited_rec_status[p] -= 1
self.rec_commit_idx = len(trace.hist)
# step 1: select the parant trace to expand