|
Download README.md from Areyliu/AgentBench_env: direct link, hf CLI and curl.
- Browser
- Download file 3.89 kB
-
https://huggingface.co/datasets/Areyliu/AgentBench_env/resolve/main/README.md
- Command line
-
hf download hf://datasets/Areyliu/AgentBench_env/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Areyliu/AgentBench_env/resolve/main/README.md
3.89 kB
| language: | |
| - zh | |
| - en | |
| tags: | |
| - agentbench | |
| - posttrainbench | |
| - webshop | |
| - alfworld | |
| - dbbench | |
| # PostTrainBench — AgentBench 环境资源 | |
| 下载入口:[Areyliu/AgentBench_env](https://huggingface.co/datasets/Areyliu/AgentBench_env/tree/main)。 | |
| 本仓库保存 PostTrainBench 接入 DBBench、WebShop、ALFWorld 所需的三个资源目录。每个目录以 `tar.gz` 包保存,下载后解压到 `PostTrainBench/envs/`,即可恢复任务启动脚本使用的目录结构。 | |
| ## 资源内容 | |
| | Hugging Face 目录 | 包内恢复的目录 | 内容 | | |
| |---|---|---| | |
| | `agentbenchdbbench/` | `agentbenchdbbench/data/`、`run/` | MySQL 8.0.28 初始化的干净数据模板;不包含此前测试的 SQL 历史或生成密钥 | | |
| | `agentbenchwebshop/` | `agentbenchwebshop/webshop-src/` | WebShop 源码、商品/用户指令数据、100k Lucene 索引和构建资源 | | |
| | `agentbenchalfworld/` | `agentbenchalfworld/data/` | ALFWorld 游戏、任务 JSON 和 PDDL 数据 | | |
| WebShop 完整原始商品文件和 ALFWorld 完整游戏集合保留,便于后续扩充训练数据。当前评测使用的商品子集、索引及题目划分保持不变。WebShop 的 Python 缓存文件不纳入资源包。 | |
| 各目录的 `ARCHIVE.json` 记录压缩包 SHA-256、文件数及大小,`MANIFEST.json` 记录包内每个文件的 SHA-256。根目录 `ARCHIVES.json` 汇总三个资源包。 | |
| ## 下载与解压 | |
| 以下命令在 Linux 上执行。下载目录应位于 `envs/` 外;对已有资源先备份,再将压缩包解压到空的资源目录。 | |
| ```bash | |
| python -m pip install huggingface_hub | |
| hf download Areyliu/AgentBench_env --repo-type dataset \ | |
| --local-dir /absolute/path/to/agentbench-download | |
| cd /absolute/path/to/PostTrainBench | |
| mkdir -p envs | |
| for name in agentbenchdbbench agentbenchwebshop agentbenchalfworld; do | |
| tar -xzf "/absolute/path/to/agentbench-download/$name/$name.tar.gz" -C envs | |
| done | |
| ``` | |
| 验证压缩包后再解压: | |
| ```bash | |
| python - <<'PY' | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| root = Path('/absolute/path/to/agentbench-download') | |
| for info in json.loads((root / 'ARCHIVES.json').read_text()): | |
| path = root / info['archive'] | |
| digest = hashlib.sha256() | |
| with path.open('rb') as stream: | |
| for chunk in iter(lambda: stream.read(8 * 1024 * 1024), b''): | |
| digest.update(chunk) | |
| assert digest.hexdigest() == info['archive_sha256'], path | |
| print('OK', path.name) | |
| PY | |
| ``` | |
| ## Conda 依赖 | |
| 资源包不包含 Python/venv、JDK、MySQL 二进制或安装包。共享 Conda 环境须满足 PostTrainBench 中以下文件的依赖: | |
| - `containers/requirements-direct.txt`:PTB 原有 Python 依赖; | |
| - `containers/requirements-agentbench.txt`:三个任务的补充 Python 依赖; | |
| - `containers/environment-agentbench.yml`:Python 3.10、Java 11、MySQL 8.0.28、ICU 70.1。 | |
| 在 PostTrainBench 根目录创建共享环境: | |
| ```bash | |
| bash scripts/setup_agentbench_conda.sh --prefix /absolute/path/to/ptb-agentbench | |
| ``` | |
| 在 PostTrainBench 的 `.env` 中配置: | |
| ```bash | |
| PTB_AGENTBENCH_CONDA_PREFIX="/absolute/path/to/ptb-agentbench" | |
| ``` | |
| 随后照常使用 `src/run_task.sh`。任务资源默认位于 `<repo>/envs`,可以用 `PTB_AGENTBENCH_ENVS_ROOT` 覆盖。模型训练、vLLM 模型服务及模型评测仍使用 PTB 原有 Apptainer SIF。 | |
| DBBench 数据模板面向同版本 Linux x86_64 MySQL。也可以不下载 DBBench 模板,直接执行 `PTB_AGENTBENCH_CONDA_PREFIX=... bash scripts/bootstrap_agentbench_envs.sh --only dbbench` 初始化。 | |
| ## 来源 | |
| - [WebShop](https://github.com/princeton-nlp/WebShop) | |
| - [ALFWorld](https://github.com/alfworld/alfworld) | |
| - [AgentBench](https://github.com/THUDM/AgentBench) | |
| 资源随其原始项目的许可使用;源文件中的许可证保留。训练/验证/正式题目切分和 HTTP 服务适配代码位于 PostTrainBench 的三个任务目录中。 | |