Download all_scripts/audit2.py from SeanWang0027/rose-opd-implementation: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/audit2.py
- Command line
-
hf download hf://SeanWang0027/rose-opd-implementation/all_scripts/audit2.py
-
curl -L -o audit2.py https://huggingface.co/SeanWang0027/rose-opd-implementation/resolve/main/all_scripts/audit2.py
1.02 kB
| P = "/home/haojinw2/rose-bundle-new/verl/recipe/rose/rose_agent_loop.py" | |
| s = open(P).read() | |
| mark = " # ==================================================================" | |
| pipe = s[s.index(mark):] # 整个流水区域(含 _make_prefix_item) | |
| checks = [ | |
| ("budget 受 response_length 约束", "max(0, self.response_length - len(prefix_ids))" in pipe), | |
| ("drop 时不生成 teacher prompt", "if not drop and prefix_ids:" in pipe), | |
| ("early_finish 判定与同步版一致", "early_finish = len(prefix_ids) < clamped" in pipe), | |
| ("resample 用同一 cut_min 规则", "lo = self.cut_min if self.cut_min < n else 1" in pipe), | |
| ("teacher 只在有料时调用", 'item["tprompt"] is not None and item["budget"] > 0' in pipe), | |
| ("学生生成与 teacher 并发(create_task)", "asyncio.create_task" in pipe), | |
| ("冷启动返回零掩码", '"rose/pipeline_warmup": 1.0' in pipe), | |
| ] | |
| for n, ok in checks: | |
| print(f" [{'OK' if ok else '缺'}] {n}") | |
| print("\n流水区域行数:", pipe.count("\n")) | |