|
|
@@ -176,9 +176,7 @@ def process_instance(
|
|
|
# Create the agent
|
|
|
agent = Agent.get_cls(metadata.agent_class)(llm=LLM(llm_config=metadata.llm_config))
|
|
|
|
|
|
- workspace_mount_path = os.path.join(
|
|
|
- metadata.config.workspace_mount_path, '_eval_workspace'
|
|
|
- )
|
|
|
+ workspace_mount_path = os.path.join(config.workspace_mount_path, '_eval_workspace')
|
|
|
# create process-specific workspace dir
|
|
|
workspace_mount_path = os.path.join(workspace_mount_path, str(os.getpid()))
|
|
|
pathlib.Path(workspace_mount_path).mkdir(parents=True, exist_ok=True)
|
|
|
@@ -318,7 +316,7 @@ IMPORTANT TIPS:
|
|
|
'swe_instance': instance.to_dict(), # SWE Bench specific
|
|
|
'instruction': instruction,
|
|
|
'git_patch': git_patch, # SWE Bench specific
|
|
|
- 'metadata': metadata,
|
|
|
+ 'metadata': metadata.model_dump(),
|
|
|
'history': [
|
|
|
(event_to_dict(action), event_to_dict(obs)) for action, obs in state.history
|
|
|
],
|
|
|
@@ -358,6 +356,8 @@ if __name__ == '__main__':
|
|
|
|
|
|
id_column = 'instance_id'
|
|
|
llm_config = get_llm_config_arg(args.llm_config) if args.llm_config else config.llm
|
|
|
+ if args.llm_config and llm_config is None:
|
|
|
+ raise ValueError(f'Could not find LLM config {args.llm_config}')
|
|
|
logger.info(f'Config for evaluation: {config}')
|
|
|
|
|
|
details = {}
|
|
|
@@ -371,6 +371,7 @@ if __name__ == '__main__':
|
|
|
llm_config,
|
|
|
'swe-bench-lite',
|
|
|
args.agent_cls,
|
|
|
+ args.max_iterations,
|
|
|
args.eval_note,
|
|
|
args.eval_output_dir,
|
|
|
details=details,
|