yxc20098 commited on
Commit
3c41d18
·
1 Parent(s): 3450be4

Fix CI: remove openra_env dependency from get_agent_fn

Browse files

No-op agent placeholder doesn't need OpenRAAction model — a plain dict
works and avoids requiring openra-rl as a dependency in CI.

Files changed (1) hide show
  1. evaluate.py +3 -9
evaluate.py CHANGED
@@ -149,16 +149,10 @@ async def run_game(env: Any, agent_fn: Any, max_steps: int) -> Dict[str, Any]:
149
  def get_agent_fn(agent_type: str) -> Any:
150
  """Get the agent decision function for the specified type.
151
 
152
- Returns a callable that takes an observation and returns an action.
153
  """
154
- if agent_type == "scripted":
155
- from openra_env.models import OpenRAAction
156
- # Simple no-op agent for evaluation framework testing
157
- # TODO: Wire to openra_env.agents.scripted.ScriptedBot when extracted
158
- return lambda obs: OpenRAAction(commands=[])
159
- else:
160
- from openra_env.models import OpenRAAction
161
- return lambda obs: OpenRAAction(commands=[])
162
 
163
 
164
  def _wake_hf_space(server_url: str, max_wait: int = 120) -> None:
 
149
  def get_agent_fn(agent_type: str) -> Any:
150
  """Get the agent decision function for the specified type.
151
 
152
+ Returns a callable that takes an observation and returns an action dict.
153
  """
154
+ # No-op agent: sends empty commands each step
155
+ return lambda obs: {"commands": []}
 
 
 
 
 
 
156
 
157
 
158
  def _wake_hf_space(server_url: str, max_wait: int = 120) -> None: