Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- 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
|
| 127 |
-
|
|
|
|
|
|
|
| 128 |
|
| 129 |
-
while not
|
| 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
|