krishuggingface commited on
Commit
14e5865
·
1 Parent(s): 56a4099

Optimize LLM frame rate to fix evaluation timeout

Browse files
Files changed (1) hide show
  1. inference.py +6 -2
inference.py CHANGED
@@ -346,8 +346,12 @@ def run_episode(task_id: int) -> float:
346
  info = {}
347
 
348
  while not done:
349
- # LLM is always primary; heuristic is the silent fallback inside llm_agent()
350
- action = llm_agent(obs)
 
 
 
 
351
 
352
  step_resp = requests.post(
353
  f"{ENV_URL}/step",
 
346
  info = {}
347
 
348
  while not done:
349
+ # Frame skipping: only invoke the LLM every 5 steps to prevent 30-min evaluation timeouts.
350
+ # Step skips use the heuristics to keep episode run-time blazing fast.
351
+ if step_count % 5 == 0:
352
+ action = llm_agent(obs)
353
+ else:
354
+ action = heuristic_agent(obs)
355
 
356
  step_resp = requests.post(
357
  f"{ENV_URL}/step",