sravaniamere commited on
Commit
bb74cb1
·
1 Parent(s): 4768f7c

fix inference to handle new reset response format

Browse files
Files changed (1) hide show
  1. inference.py +2 -1
inference.py CHANGED
@@ -197,7 +197,8 @@ async def run_task(task_name: str) -> None:
197
  try:
198
  reset_resp = await http.post("/reset", json={"difficulty": task_name})
199
  reset_resp.raise_for_status()
200
- obs = reset_resp.json()
 
201
  except Exception as exc:
202
  print(f"[DEBUG] Reset failed: {exc}", flush=True)
203
  # Do NOT return here — fall through to finally so [END] is always logged
 
197
  try:
198
  reset_resp = await http.post("/reset", json={"difficulty": task_name})
199
  reset_resp.raise_for_status()
200
+ reset_data = reset_resp.json()
201
+ obs = reset_data.get("observation", reset_data)
202
  except Exception as exc:
203
  print(f"[DEBUG] Reset failed: {exc}", flush=True)
204
  # Do NOT return here — fall through to finally so [END] is always logged