Skip to content

Commit

Permalink
add type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPiche committed Jan 22, 2025
1 parent 5bf610d commit 0e46df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/rl_gsm8k/orchestrate_rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def extract_tape_training_samples(
no_error, reward, success = 0, -1, 0
else:
no_error = 1
prediction = extract_fn(new_tape.steps[0].task, new_tape.steps[-1].reasoning, "cot")
prediction = extract_fn(new_tape.steps[0].task, new_tape.steps[-1].reasoning, "cot") # type: ignore
answer = new_tape.steps[0].metadata.other["value"]
if eval_fn(
{
Expand Down Expand Up @@ -279,7 +279,7 @@ def generate_training_data(
replica_tapes = [tapes[i :: len(agent_replicas)] for i in range(len(agent_replicas))]
results = list(executor.map(batch_run_agent_replica, agent_replicas, replica_tapes))
final_tapes = list(chain(*[r[1] for r in results]))
agent_replicas = [r[0] for r in results]
agent_replicas = [r[0] for r in results] # type: ignore
logger.info(f"Making tapes took {time.time() - start_making_tapes}")

for new_tape in tqdm(final_tapes, total=len(final_tapes), desc="Extracting training data from tapes", unit="tape"):
Expand Down

0 comments on commit 0e46df4

Please sign in to comment.