Download all_scripts/add_sciw.py from SeanWang0027/rose-opd-implementation: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/add_sciw.py
- Command line
-
hf download hf://SeanWang0027/rose-opd-implementation/all_scripts/add_sciw.py
-
curl -L -o add_sciw.py https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/add_sciw.py
1.38 kB
| """把 SciWorld 评测 rollout 补进 data-dq。 | |
| 这批在家目录根下(sciw_*.jsonl), 之前打包 evalout 时只扫了 evalout/ 目录, 漏了。 | |
| 它们是 SciWorld 结果表的原始依据 —— 逐题完整轨迹。 | |
| """ | |
| import huggingface_hub.lfs as _lfs | |
| from huggingface_hub import CommitOperationAdd, HfApi | |
| _orig = _lfs.post_lfs_batch_info | |
| def _patched(*a, **kw): | |
| actions, errors, transfer = _orig(*a, **kw) | |
| for o in actions: | |
| for act in (o.get("actions") or {}).values(): | |
| h = act.get("href", "") | |
| if "hf-mirror.org" in h: | |
| act["href"] = h.replace("hf-mirror.org", "hf-mirror.com") | |
| return actions, errors, transfer | |
| _lfs.post_lfs_batch_info = _patched | |
| try: | |
| import huggingface_hub._commit_api as _ca | |
| _ca.post_lfs_batch_info = _patched | |
| except Exception: | |
| pass | |
| api = HfApi(endpoint="https://hf-mirror.com") | |
| api.create_commit( | |
| repo_id="SeanWang0027/data-dq", repo_type="model", | |
| operations=[CommitOperationAdd( | |
| path_in_repo="sciworld_eval/sciworld_eval_rollouts.tar.gz", | |
| path_or_fileobj="/home/haojinw2/_pack_sciw/sciworld_eval_rollouts.tar.gz")], | |
| commit_message="add SciWorld eval rollouts (AgentGym 200-task, all lines)") | |
| print(" 已补进 data-dq") | |
| fs = api.list_repo_files("SeanWang0027/data-dq") | |
| print(" sciworld 相关:", [f for f in fs if "sciw" in f.lower()]) | |