feat: backend gate fallback + metric_diff docs + submit_sft fix
- Auto-inject human-review gate when agent asks question but forgets gate entry - Add complex_dev/complex_base field docs to program.md metric_diff table - Fix submit_sft.sh minor issues - jupyter_runtime improvements Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+24
-6
@@ -297,14 +297,32 @@ class JupyterRuntimeSession:
|
||||
if not self.skills_root:
|
||||
return
|
||||
chat_root = self.chat_workspace_root
|
||||
src = f'{self.skills_root}/model-iteration/scripts/prepare_and_train_sft.py'
|
||||
dst = f'{chat_root}/scripts/prepare_and_train_sft.py'
|
||||
result = self.run_command(
|
||||
(
|
||||
# SKILL/program §5 让 agent 直接 `bash scripts/<x>` 调下面这些脚本,
|
||||
# 不同步过去 → agent 当 "脚本不存在" 处理后会肉手写 yaml,常把
|
||||
# imageCommand 里的 `/scripts/prepare_and_train_sft.py` 写丢前缀,
|
||||
# 导致训练 pod 报 "No such file or directory"。每次 bind 全量覆盖
|
||||
# 一份,跟 prepare_and_train_sft.py 同样 "刷最新版"。
|
||||
script_names = (
|
||||
'prepare_and_train_sft.py',
|
||||
'submit_sft.sh',
|
||||
'sft_train_job.yaml.tpl',
|
||||
'submit_cml_eval.sh',
|
||||
'resolve_run_ids.sh',
|
||||
)
|
||||
src_dir = f'{self.skills_root}/model-iteration/scripts'
|
||||
dst_dir = f'{chat_root}/scripts'
|
||||
copy_cmds = []
|
||||
for name in script_names:
|
||||
src = f'{src_dir}/{name}'
|
||||
dst = f'{dst_dir}/{name}'
|
||||
copy_cmds.append(
|
||||
f'if [ -f {shlex.quote(src)} ]; then '
|
||||
f'cp {shlex.quote(src)} {shlex.quote(dst)}; '
|
||||
f'cp {shlex.quote(src)} {shlex.quote(dst)} && '
|
||||
f'chmod +x {shlex.quote(dst)} 2>/dev/null || true; '
|
||||
f'fi'
|
||||
),
|
||||
)
|
||||
result = self.run_command(
|
||||
' && '.join(copy_cmds),
|
||||
timeout_seconds=timeout_seconds,
|
||||
max_output_chars=2000,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user