File tree Expand file tree Collapse file tree
workspace/tasks/task002_m0_secondary_fixes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# history_log
22
3- <!-- METADATA:SESSION=0 -->
3+ <!-- METADATA:SESSION=1 -->
44
55## Session 0 - 2026-05-17 - intern_nemontron_review_cc
66
77- 由 intern_nemontron_review_cc 创建任务,登记 task001 review 中遗留的 3 项次优先级修复。
8+
9+ ## Session 1 - 2026-05-17 - intern_nemontron_review_cc
10+
11+ 接受任务并完成全部 3 项次优先级修复 + 4 个回归测试。
12+
13+ 分支 ` intern_nemontron_review_cc/task002_m0_secondary_fixes ` ,PR < https://github.com/songCNMS/Nemotron/pull/5 > ,状态 CLEAN/MERGEABLE,等审。
14+
15+ 涉及文件(与 task001 同一批):
16+ - ` src/nemotron/recipes/super3/milestones/m0_data_env/prepare_m0_assets.py `
17+ - ` src/nemotron/recipes/super3/milestones/m0_data_env/run_m0_health_baseline.py `
18+ - ` src/nemotron/recipes/super3/milestones/m0_data_env/data_registry.yaml `
19+ - ` tests/recipes/super3/test_m0_data_env.py `
20+ - ` tests/recipes/super3/test_m0_health_baseline.py `
21+
22+ 修复要点:
23+ 1 . ** #7 Hermes 多轮** :移除 ` convert_hermes_conversations ` 在第一条 assistant 处的 ` break ` ;新增 ` HERMES_ROLE_MAP ` 包含 tool / function / function_response / observation;返回字典加 ` expected_trajectory ` / ` expected_final_content ` / ` expected_turn_count ` ;` transform_hermes_function_calling ` 把这三项落到 ` extra_env_info ` 。` expected_tool_calls ` / ` expected_assistant_content ` 仍是首轮值(向后兼容)。
24+ 2 . ** #8 hermes hf_config** :` data_registry.yaml ` 锁定 ` func_calling_singleturn ` ;注释说明该 config 只有 ` train ` split,故继续走 task001 的 fallback 警告路径。
25+ 3 . ** #15 aggregate 重复执行** :` evaluate_policy ` 拆成 ` score_rows ` + ` aggregate_scored_rows ` ;` summarize_baselines ` 缓存 split-级 scored 结果,aggregate 由拼接得到,subprocess fork 数量减半;` evaluate_policy ` 改成两函数的薄封装,签名不变。
26+
27+ 测试:
28+ - ` PYTHONPATH=src pytest tests/recipes/super3/ -v ` → ** 24 passed** (原 20 + 新 4)。
29+ - 新增 case:hermes multi-turn trajectory、hermes hf_config 锁定、monkeypatch counter 验证 aggregate 不重算(3 行 oracle 只 score_record 3 次)、score_rows + aggregate_scored_rows 与 evaluate_policy 行为等价。
30+
31+ 待办:PR #5 review / merge。
Original file line number Diff line number Diff line change 11# task_knowledge
22
3- <!-- METADATA:SESSION=0 -->
3+ <!-- METADATA:SESSION=1 -->
44
55## 编写规则
66
99
1010## 知识条目
1111
12- (空 — 后续填充)
12+ ### Hermes function-calling 的 config 选择
13+
14+ ` NousResearch/hermes-function-calling-v1 ` 在 HF hub 上有多个 config:
15+ - ` func_calling_singleturn ` — 单轮工具调用(M0 当前默认)。
16+ - ` func_calling ` — 多轮工具调用 + 最终答案。
17+ - ` glaive_func_calling ` — Glaive 来源、风格略不同。
18+ - ` json_mode_singleturn ` / ` json_mode_agentic ` — JSON 结构化输出。
19+
20+ 每个 config 只有 ` train ` split,没有官方 holdout,所以 ` prepare_m0_assets ` 对 hermes 一直走"sequential val 切片 + manifest.warnings"的 fallback。
21+
22+ 未来 M1 / M2 启用 agent loop(` general_tool_calling ` 环境 ` max_turns > 2 ` )后再切到 ` func_calling ` 多轮 config;目前的 #7 fix 已经把多轮轨迹收集进 ` extra_env_info.expected_trajectory ` ,切 config 后只需把环境 ` max_turns ` 调大并让 verifier 消费 trajectory。
23+
24+ ### M0 baseline 的 subprocess 成本
25+
26+ ` code_execution_python ` env 跑一次 health baseline 时:
27+ - per-row × per-policy × per-candidate 调一次 subprocess(` run_python_unit_tests ` )。
28+ - 三个 policy(oracle / empty / oracle_then_empty)candidates 数量分别是 1 / 1 / 2。
29+
30+ task002 之后 aggregate 不再重跑 verifier,所以 N 行总 subprocess 次数 = N × (1+1+2) = 4N。
31+ (task001 当时是 8N,task002 减半到 4N。)
You can’t perform that action at this time.
0 commit comments