Tejasva commited on
Commit ·
d24e4fa
1
Parent(s): fcc7d82
fix: remove START/END prints from run_episode, convert to STEP format
Browse files- inference.py +2 -2
inference.py
CHANGED
|
@@ -239,7 +239,7 @@ def run_episode(env: CodeGuardianEnv, client: OpenAI, MODEL_NAME: str, agent_sta
|
|
| 239 |
episode_history = []
|
| 240 |
step_count = 0
|
| 241 |
|
| 242 |
-
print(f"
|
| 243 |
logger.info(f"[EPISODE START] Episode {agent_state.episode + 1} - model={MODEL_NAME} task_id={obs.task_id} difficulty={obs.difficulty}")
|
| 244 |
|
| 245 |
while not env.done:
|
|
@@ -310,7 +310,7 @@ def run_episode(env: CodeGuardianEnv, client: OpenAI, MODEL_NAME: str, agent_sta
|
|
| 310 |
break
|
| 311 |
|
| 312 |
# Final episode log
|
| 313 |
-
print(f"
|
| 314 |
logger.info(f"[EPISODE END] Episode {agent_state.episode + 1} - final_score={episode_reward:.3f} total_steps={step_count} strategy={agent_state.prompt_strategy}")
|
| 315 |
|
| 316 |
return episode_reward, episode_history
|
|
|
|
| 239 |
episode_history = []
|
| 240 |
step_count = 0
|
| 241 |
|
| 242 |
+
print(f"STEP: Episode {agent_state.episode + 1} started - model={MODEL_NAME} task_id={obs.task_id} difficulty={obs.difficulty}")
|
| 243 |
logger.info(f"[EPISODE START] Episode {agent_state.episode + 1} - model={MODEL_NAME} task_id={obs.task_id} difficulty={obs.difficulty}")
|
| 244 |
|
| 245 |
while not env.done:
|
|
|
|
| 310 |
break
|
| 311 |
|
| 312 |
# Final episode log
|
| 313 |
+
print(f"STEP: Episode {agent_state.episode + 1} complete - final_score={episode_reward:.3f} total_steps={step_count} strategy={agent_state.prompt_strategy}")
|
| 314 |
logger.info(f"[EPISODE END] Episode {agent_state.episode + 1} - final_score={episode_reward:.3f} total_steps={step_count} strategy={agent_state.prompt_strategy}")
|
| 315 |
|
| 316 |
return episode_reward, episode_history
|