amanmurari commited on
Commit
5397198
·
verified ·
1 Parent(s): f68b823

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. inference.py +5 -3
inference.py CHANGED
@@ -123,10 +123,12 @@ def run_task(task: str, client: OpenAI) -> dict:
123
 
124
  try:
125
  with TrafficControlEnv(base_url=SERVER_URL).sync() as env:
126
- # env.reset() returns a TrafficObservation directly
127
- obs: TrafficObservation = env.reset(task_id=task, seed=SEED)
 
 
128
 
129
- while not obs.done:
130
  step += 1
131
 
132
  # Call the LLM proxy — this is the call the validator monitors
 
123
 
124
  try:
125
  with TrafficControlEnv(base_url=SERVER_URL).sync() as env:
126
+ # env.reset() returns a StepResult; unwrap the observation
127
+ reset_result = env.reset(task_id=task, seed=SEED)
128
+ obs: TrafficObservation = reset_result.observation
129
+ done = reset_result.done
130
 
131
+ while not done:
132
  step += 1
133
 
134
  # Call the LLM proxy — this is the call the validator monitors