Update claude endpoint

This commit is contained in:
Timothyxxx
2024-03-18 14:59:02 +08:00
parent d74ab1a44e
commit c1c7ac298f
2 changed files with 10 additions and 13 deletions

View File

@@ -46,7 +46,7 @@ def run_single_example(agent, env, example, max_steps, instruction, args, exampl
str_table.add_data(wandb.Image(data_or_path=os.path.join(example_result_dir, f"step_{step_idx + 1}_{action_timestamp}.png"), caption=f"step_{step_idx + 1}_{action_timestamp}"),
thisrun_a11tree,
response, action, action_timestamp, done)
run.log({"Reward": reward})
run.log({"Reward": reward})
with open(os.path.join(example_result_dir, "traj.jsonl"), "a") as f:
f.write(json.dumps({
"step_num": step_idx + 1,
@@ -62,7 +62,6 @@ def run_single_example(agent, env, example, max_steps, instruction, args, exampl
logger.info("The episode is done.")
break
step_idx += 1
# wandb.log({"str_trajectory": str_table})
run.log({"str_trajectory": str_table})
result = env.evaluate()
logger.info("Result: %.2f", result)
@@ -71,4 +70,3 @@ def run_single_example(agent, env, example, max_steps, instruction, args, exampl
f.write(f"{result}\n")
env.controller.end_recording(os.path.join(example_result_dir, "recording.mp4"))
run.log({"Result": result})
# wandb.log({"Result": result})