Tejasva commited on
Commit
fcc7d82
·
1 Parent(s): 50e4c08

fix: remove START/END prints from run_baseline, convert to STEP format

Browse files
Files changed (1) hide show
  1. inference.py +2 -4
inference.py CHANGED
@@ -164,8 +164,7 @@ def run_llm_inference(client: OpenAI, MODEL_NAME: str, prompt: str) -> str:
164
 
165
  def run_baseline(env: CodeGuardianEnv) -> float:
166
  """Run a simple non-learning baseline agent for comparison."""
167
- print("START: Running baseline agent...")
168
- logger.info("[BASELINE START] Running baseline agent...")
169
 
170
  obs = env.reset()
171
  total_reward = 0.0
@@ -191,8 +190,7 @@ def run_baseline(env: CodeGuardianEnv) -> float:
191
 
192
  logger.info(f"[BASELINE STEP] {step_count}: {step_type} -> reward={reward.value:+.3f}")
193
 
194
- print(f"END: Baseline complete - Total reward: {total_reward:.3f}, Steps: {step_count}")
195
- logger.info(f"[BASELINE END] Total reward: {total_reward:.3f}, Steps: {step_count}")
196
  return total_reward
197
 
198
  def update_agent_state(agent_state: AgentState, episode_reward: float, feedback: str) -> AgentState:
 
164
 
165
  def run_baseline(env: CodeGuardianEnv) -> float:
166
  """Run a simple non-learning baseline agent for comparison."""
167
+ print("STEP: Running baseline agent")
 
168
 
169
  obs = env.reset()
170
  total_reward = 0.0
 
190
 
191
  logger.info(f"[BASELINE STEP] {step_count}: {step_type} -> reward={reward.value:+.3f}")
192
 
193
+ print(f"STEP: Baseline complete - total_reward={total_reward:.3f} steps={step_count}")
 
194
  return total_reward
195
 
196
  def update_agent_state(agent_state: AgentState, episode_reward: float, feedback: str) -> AgentState: