Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ If you started the task server with the lite preset, you can also run the lite e
python -m src.assigner --config configs/assignments/lite.yaml
```

If you started the AgentBench FC stack via docker compose (`extra/docker-compose.yml`), use the FC assignment preset (controller on port 5020):

```bash
python -m src.assigner --config configs/assignments/default_fc.yaml
```

## Next Steps

If you wish to launch more tasks or use other models, you can refer to the content
Expand Down
25 changes: 25 additions & 0 deletions configs/assignments/default_fc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Default assignment preset for AgentBench FC (AgentRL controller on :5020).
#
# Bring up the stack:
# docker compose -f extra/docker-compose.yml up
#
# Run:
# python -m src.assigner --config configs/assignments/default_fc.yaml

import: definition_fc.yaml

concurrency:
task:
dbbench-std: 5
os-std: 5
agent:
gpt-3.5-turbo-0613: 5

assignments:
- agent:
- gpt-3.5-turbo-0613
task:
- dbbench-std
- os-std

output: "outputs/{TIMESTAMP}"
22 changes: 22 additions & 0 deletions configs/assignments/definition_fc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Definition preset for AgentBench FC (AgentRL controller).
#
# The docker-compose stack in extra/docker-compose.yml uses an AgentRL controller
# that listens on port 5020 (host network mode). Use this definition when you
# start the benchmark with:
#
# docker compose -f extra/docker-compose.yml up
#
# Then run assigner with:
# python -m src.assigner --config configs/assignments/default_fc.yaml

definition:
task:
overwrite:
module: src.client.TaskClient
parameters:
controller_address: "http://localhost:5020/api"
import: ../tasks/task_assembly.yaml
agent:
import:
- ../agents/api_agents.yaml
- ../agents/fs_agent.yaml
1 change: 1 addition & 0 deletions docs/Entrance_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ real-time to the specified output directory.
Parameters for assigner:

- `[--config CONFIG]`: Specifies the configuration file to read. Default is `configs/assignments/default.yaml`.
- If you started the AgentBench FC stack via `docker compose -f extra/docker-compose.yml up`, use `configs/assignments/default_fc.yaml` (controller on `http://localhost:5020/api`).
- `[--auto-retry]`: Auto retry failed samples.

If the `output` field in the configuration contains `{TIMESTAMP}`, it will be replaced with the current time for
Expand Down
9 changes: 8 additions & 1 deletion src/client/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ def get_concurrency(self) -> int:
self.controller_address + "/list_workers"
)
except Exception as e:
print(ColorMessage.yellow(f"Warning task {self.name} cannot connect to controller {e}"))
print(
ColorMessage.yellow(
"Warning: task '{}' cannot connect to controller '{}': {}. "
"If you started the AgentRL controller via `docker compose -f extra/docker-compose.yml up`, "
"the controller is typically on http://localhost:5020/api; set `controller_address` in the assignment config accordingly."
.format(self.name, self.controller_address, e)
)
)
return 0
if result.status_code != 200:
raise AgentBenchException(result.text, result.status_code, self.name)
Expand Down