#1430·RD-Agent

错误: 当跟踪 DAG 中有任何节点具有多于一个子节点时, DSTrace.get_sibling_exps 会发生 KeyError 并崩溃

作者: Fr3ya创建于 2026年6月28日更新于 2026年8月2日
标签bug

class FakeExp: def init(self, label, parent=()): self.label = label self.local_selection = parent def repr(self): return f"Exp({self.label})"

class FakeTrace: NEW_ROOT = () def init(self, dag_parent, hist, uncommitted=None, current=()): self.dag_parent = dag_parent self.hist = hist self.uncommitted_experiments = uncommitted or {} self._cur = current def get_current_selection(self): return self._cur

def get_sibling_exps(self, current_selection=None): """Verbatim port of DSTrace.get_sibling_exps.""" if current_selection is None: current_selection = self.get_current_selection() ignore_leaf_idx = [current_selection[0]] if current_selection != self.NEW_ROOT else [] sibling_exps = [] touched_node_set = set() for idx in range(len(self.dag_parent)): touched_node_set.add(idx) if self.dag_parent[idx] == self.NEW_ROOT: continue for parent in self.dag_parent[idx]: …

内容来源: microsoft/RD-Agent