Files
zk-data-agent/skills/model-iteration/scripts/resolve_run_ids.sh
T
wangsenhao a09d4afacd fix: pipeline排序/runDic映射/label-master repeatable/达标优先级
- pipeline items 按 first_ts 自然时间排序,去掉 hardcoded section_order
- augment step-detail 去掉 R{n-1} 偏移,直接用本轮 runDic(与 resolve_run_ids.sh 实际行为对齐)
- 加 BundledSkill.repeatable 字段,label-master 标记 repeatable:true 跳过 duplicate detection
- SKILL.md/program.md: 目标集≥95%最高优先级,未达标前其他集合轻微下降不回滚
- SKILL.md/program.md: 禁止正则脚本替代 label-master 语义复核
- program.md: 每轮 SFT 前必须展示训练数据组成
- resolve_run_ids.sh: 修正注释(SFT_RUNDIC = 当轮 eval workflow id)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:10:32 +08:00

44 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# resolve_run_ids.sh —— SFT/EVAL runDic 单一可信来源
#
# 规则(与 program.md §756 对齐):
# SFT_RUNDIC = workflow5/ 下「已落盘」(含 metric_diff/lark_template.json)的最大 runDic
# = 当轮 eval 自身的 workflow id(因为 resolve 在 eval 落盘后调用)
# augment 落盘、SFT yaml、modified_samples 归档全用这个值
# EVAL_RUNDIC = SFT_RUNDIC + 1
# 仅下一轮 cml workflow run 提交时使用
#
# 用法:
# eval "$(./scripts/resolve_run_ids.sh)"
# echo "$SFT_RUNDIC $EVAL_RUNDIC"
#
# 失败行为:找不到任何已落盘 workflow 时打 ERR 到 stderr 并 exit 1,调用方 set -e 时直接终止。
set -euo pipefail
WF_ROOT=${WF_ROOT:-/mnt/xiaoai-zk-model-train-tj5/workflow5}
if [ ! -d "$WF_ROOT" ]; then
echo "ERR: WF_ROOT=$WF_ROOT 不存在或不可读" >&2
exit 1
fi
# 只挑「已落盘」的 workflow:必须存在 metric_diff/lark_template.json
# 这样可以避免 CML 创建了空目录就被算成最大值
MAX=$(
for d in "$WF_ROOT"/workflow*; do
[ -d "$d" ] || continue
[ -f "$d/metric_diff/lark_template.json" ] || continue
name=$(basename "$d")
echo "${name#workflow}"
done | sort -n | tail -1
)
if [ -z "$MAX" ]; then
echo "ERR: $WF_ROOT 下没有任何已落盘的 workflow(含 metric_diff/lark_template.json" >&2
exit 1
fi
echo "SFT_RUNDIC=$MAX"
echo "EVAL_RUNDIC=$((MAX+1))"