Download all_scripts/aime_launch.py from SeanWang0027/rose-opd-implementation: direct link, hf CLI and curl.
- Browser
- Download file 873 Bytes
-
https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/aime_launch.py
- Command line
-
hf download hf://SeanWang0027/rose-opd-implementation/all_scripts/aime_launch.py
-
curl -L -o aime_launch.py https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/aime_launch.py
873 Bytes
| """spawn 安全的 aime_eval 启动器。 | |
| vllm 0.27 对 Qwen3.5 这类模型强制用 spawn 起 worker, 子进程会重新 import | |
| 父进程的 __main__。aime_eval.py 是平铺脚本, 被重新 import 就会触发 | |
| multiprocessing 的 "freeze_support / Safe importing of main module" 报错。 | |
| 关键是 run_name 不能用 "__main__": runpy 在执行期间会把 sys.modules["__main__"] | |
| 临时换成目标脚本, spawn 读到的就还是 aime_eval.py, 等于没绕开(先踩过这个)。 | |
| 用别的名字, sys.modules["__main__"] 始终是本文件, 子进程 import 到 __mp_main__, | |
| 下面的 guard 不成立, 什么都不执行。aime_eval.py 的逻辑全在模块层, 不依赖 __name__。 | |
| """ | |
| import runpy | |
| import sys | |
| if __name__ == "__main__": | |
| sys.argv[0] = "/home/haojinw2/aime_eval.py" | |
| runpy.run_path("/home/haojinw2/aime_eval.py", run_name="__aime_eval__") | |