Skip to content

Commit

Permalink
revert parent_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPiche committed Jan 7, 2025
1 parent 3f6c7da commit 6e2136b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tapeagents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ def run_batch(self: Agent[TapeType], tapes: list[TapeType]) -> list[Tape]:
if not isinstance(self.llm, TrainableLLM):
raise NotImplementedError("For run_agent_batch the LLM must be TrainableLLM")
original_tapes = list(tapes)
parent_ids = [tape.metadata.id for tape in tapes]
n_iterations = 0
active_indices = set(range(len(tapes)))
while n_iterations < self.max_iterations:
Expand All @@ -737,7 +736,7 @@ def run_batch(self: Agent[TapeType], tapes: list[TapeType]) -> list[Tape]:
n_iterations += 1
for i in range(len(tapes)):
updated_metadata = original_tapes[i].metadata.model_validate(dict(
parent_id=parent_ids[i],
parent_id=original_tapes[i].metadata.id,
author=self.name,
n_added_steps=len(tapes[i]) - len(original_tapes[i])
))
Expand Down

0 comments on commit 6e2136b

Please sign in to comment.