Skip to content

Commit c782046

Browse files
Revert "docs(skills): translate dpgen-run docs to Chinese"
This reverts commit f0c7b33.
1 parent f0c7b33 commit c782046

5 files changed

Lines changed: 191 additions & 161 deletions

File tree

skills/dpgen-run/SKILL.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
22
name: dpgen-run
3-
description: 使用 param.json 和 machine.json 准备、解释、验证并运行 DP-GEN 并行学习流程。
3+
description: Prepare, explain, validate, and run DP-GEN concurrent-learning workflows using param.json and machine.json.
44
license: LGPL-3.0-or-later
55
metadata:
66
author: MatMaster
7-
version: 0.4.0
7+
version: 0.3.0
88
repository: https://github.com/deepmodeling/dpgen
99
---
1010

1111
# DP-GEN Run
1212

13-
用于迭代训练、探索、标注和再训练流程。
13+
Use this skill for the iterative train, explore, label, and retrain workflow.
1414

15-
## 使用契约
15+
## Contract
1616

17-
- 科学参数放在 `param.json`,执行参数放在 `machine.json`
18-
- 精确运行命令为 `dpgen run param.json machine.json`
19-
- 默认只准备和验证;只有用户明确确认后才执行。
17+
- Keep scientific settings in `param.json` and execution settings in `machine.json`.
18+
- Run exactly `dpgen run param.json machine.json`.
19+
- Prepare and validate by default; execute only after explicit confirmation.
2020

21-
## 工作流程
21+
## Workflow
2222

23-
1. 先检查已有数据和配置,再询问缺失输入。
24-
1. 修改现有可用文件,并保留科学及站点选择。
25-
1. 只加载当前任务需要的 reference。
26-
1. 验证 schema、生成的任务输入、阶段状态和监控信号。
27-
1. 汇报路径、命令、分体系证据、风险和后续检查。
23+
1. Inspect existing data and configurations before asking for inputs.
24+
1. Patch working files and preserve scientific/site-specific choices.
25+
1. Load only the references needed for the task.
26+
1. Validate schemas, generated task inputs, stage state, and monitoring signals.
27+
1. Report paths, command, per-system evidence, risks, and next checks.
2828

29-
## Reference
29+
## References
3030

31-
- [工作流说明](references/workflow.md):范围、布局、策略和汇报。
32-
- [配置、验证与执行](references/validation-and-run.md):两个 JSON、生成输入检查及安全启动/恢复。
33-
- [监控与排障](references/monitoring.md):准确率趋势、阶段进度和证据化诊断。
31+
- [Workflow guidance](references/workflow.md): scope, layout, policy, and reporting.
32+
- [Configuration, validation, and execution](references/validation-and-run.md): both JSON files, generated-input checks, and safe launch/restart checks.
33+
- [Monitoring and troubleshooting](references/monitoring.md): accuracy trends, stage progress, and evidence-based diagnosis.
3434

35-
## 防护规则
35+
## Guardrails
3636

37-
- 不得合并两个 JSON,也不得臆造路径、队列、模块或命令。
38-
- 保留 descriptorbackend、阈值、计划、ensemble `type_map` 选择。
39-
- 必须准确写成 `se_atten_v2`;当前 `dpgen run` 不接受 `fp_style: "none"`
40-
- 无法安全发现必需的科学或执行输入时,停止并询问。
37+
- Never merge the JSON files or invent paths, queues, modules, or commands.
38+
- Preserve descriptor, backend, thresholds, schedules, ensemble, and `type_map` choices.
39+
- Spell `se_atten_v2` exactly; `fp_style: "none"` is invalid for current `dpgen run`.
40+
- Stop and ask when required scientific or execution inputs are undiscoverable.
Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
1-
# DP-GEN 监控与排障
2-
3-
在每轮迭代后,或准确率/阶段进度停滞时加载本 reference。“准确率”指能量/力的训练与
4-
验证 RMSE;model deviation 和 FP failure ratio 是独立信号。
5-
6-
## 证据循环
7-
8-
每轮记录参数/配置身份、系统及温度/压力条件、训练/验证 RMSE、model-deviation 的
9-
accurate/candidate/failed 数量、FP 成功/失败数量、当前阶段,以及新标注是否进入下一轮
10-
训练输入。先汇报分 system、分 condition 结果,再给全局汇总。
11-
12-
## 按顺序诊断
13-
14-
| 现象 | 首先检查 | 针对性调整 |
15-
| ------------------------------------ | ---------------------------------------------------- | ------------------------------------------------- |
16-
| 训练和验证 RMSE 都长期偏高 | 单位、标签、type map、覆盖范围、descriptor 容量 | 先修数据/schema,再检查 fitting net、学习率和步数 |
17-
| 训练 RMSE 下降但验证 RMSE 停滞或上升 | 数据泄漏、重复样本、异常值、验证覆盖 | 先重新划分/去重并补代表性标注,再改模型容量 |
18-
| RMSE 良好但 model deviation 偏高 | 未见过的体系/构型或条件、初始结构 | 定向扩展采样并标注候选区间 |
19-
| candidate 数为零 | 信任阈值、MD 稳定性、轨迹频率、模型多样性 | 先检查阈值和采样设置,不要直接改训练 |
20-
| candidate 过多或 FP 失败增加 | 阈值、MD 不稳定、结构损坏、FP 收敛 | 修复输入/采样,不要把失败标签加入训练 |
21-
| 阶段不推进或任务数不对 | record 状态、计划长度、sys_idx、生成输入、提交元数据 | 对齐状态与实际任务,禁止盲目重启 |
22-
| 生效步数与请求步数不同 | 生成输入中的 reuse/迭代 override | 对比根配置和任务配置,有意修正 override |
23-
24-
## 数据与标签检查
25-
26-
检查单位和符号、原子顺序、type map、重复样本、异常幅值以及训练/验证覆盖。每个训练帧
27-
必须有有限且可解析的 energy 和 force;只有在配置并验证后才纳入 virial/stress。合并前拒绝
28-
缺失、重复或未收敛的标签。
29-
30-
## 训练检查
31-
32-
比较训练/验证曲线、loss 分量、学习率衰减、步数预算、batch size、模型容量、ensemble seed
33-
和 backend/version 兼容性。全局指标良好也不能掩盖某个 system 或 condition 的失败。一次只
34-
改变一个主要因素,并保留修改前的证据。
35-
36-
## 采样与决策检查
37-
38-
检查 MD 稳定性、温度、压力、ensemble、`nsteps``trj_freq`、信任区间位置及分 condition
39-
分布。区分模型问题和覆盖不足:RMSE 良好但 deviation 偏高通常需要定向采样;已覆盖区域
40-
RMSE 仍高则优先检查数据或训练。
41-
42-
监控是基于证据的决策阶段,不只是状态播报。扩展采样、修改阈值、增加步数或重启前,先记录
43-
证据、精确参数差异、预期效果和 controller 状态;之后记录新任务身份与结果。禁止静默调参
44-
或重启。
1+
# DP-GEN Monitoring and Troubleshooting
2+
3+
Load this reference after each iteration or whenever accuracy or stage progress
4+
stalls. Here "accuracy" means energy/force train and validation RMSE; model
5+
deviation and FP failure ratio are separate signals.
6+
7+
## Evidence loop
8+
9+
For each iteration, record the parameter/configuration identity, systems and
10+
temperature/pressure conditions, train/validation RMSE, model-deviation
11+
accurate/candidate/failed counts, FP success/failure counts, current stage, and
12+
whether new labels reached the next training input. Report per-system and
13+
per-condition results before any global aggregate.
14+
15+
## Diagnose in this order
16+
17+
| Symptom | First checks | Focused adjustment |
18+
| ---------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
19+
| Train and validation RMSE both stay high | Units, labels, type map, coverage, descriptor capacity | Fix data/schema first; then review fitting net, learning rate, and steps |
20+
| Train RMSE falls but validation RMSE stalls or rises | Split leakage, duplicates, outliers, validation coverage | Re-split or deduplicate; add representative labels before changing capacity |
21+
| RMSE is good but model deviation is high | Unseen systems/geometries or conditions, initial structures | Broaden targeted sampling and labeling the candidate window |
22+
| Candidate count is zero | Trust thresholds, MD stability, trajectory frequency, model diversity | Check thresholds and sampling settings before changing training |
23+
| Candidate count is excessive or FP failures rise | Thresholds, unstable MD, malformed structures, FP convergence | Repair inputs/sampling; do not add failed labels |
24+
| Stage does not advance or task count is wrong | record state, schedule length, sys_idx, generated input, submission metadata | Reconcile state and actual tasks; do not restart blindly |
25+
| Effective steps differ from requested steps | Reuse/iteration override in generated input | Compare root and task-level values; fix the override deliberately |
26+
27+
## Data and label checks
28+
29+
Check units and signs, atom ordering, type maps, duplicates, abnormal
30+
magnitudes, and train/validation coverage. Every training frame must have
31+
finite, parseable energy and force; include virial/stress only when configured
32+
and verified. Reject incomplete, duplicated, or unconverged labels before
33+
merging them into training data.
34+
35+
## Training checks
36+
37+
Compare train and validation curves, loss components, learning-rate decay, step
38+
budget, batch size, model capacity, ensemble seeds, and backend/version
39+
compatibility. A good global metric must not hide a failing system or condition.
40+
Change one major factor at a time and retain the previous evidence.
41+
42+
## Sampling and decision checks
43+
44+
Inspect MD stability, temperatures, pressures, ensembles, `nsteps`, `trj_freq`,
45+
trust-window placement, and per-condition distributions. Distinguish a model
46+
problem from missing coverage: good RMSE with high deviation usually calls for
47+
targeted sampling, while high RMSE on covered data calls for data or training
48+
review.
49+
50+
Monitoring is an evidence-based decision stage, not only status reporting.
51+
Before extending sampling, changing thresholds, increasing steps, or restarting,
52+
record the evidence, exact parameter delta, expected effect, and controller
53+
state. Afterward record the new task identity and outcome; never retune or
54+
restart silently.
Lines changed: 67 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,94 @@
1-
# DP-GEN 配置、验证与执行
1+
# DP-GEN Configuration, Validation, and Execution
22

3-
在创建、审阅、验证、启动或恢复 `dpgen run` 配置时加载本 reference。
3+
Load this reference when creating, reviewing, validating, launching, or
4+
recovering a `dpgen run` configuration.
45

5-
## 1. `param.json` 要点
6+
## 1. `param.json` essentials
67

7-
应保留或收集:
8+
Preserve or collect:
89

9-
- `type_map`(有序元素符号)、可选的 `mass_map``init_data_prefix` `init_data_sys`
10-
- `sys_configs_prefix` `sys_configs`(系统列表,每个系统又是结构列表);
11-
- `numb_models` 以及完整的 `default_training_param.model``learning_rate``loss` `training`
12-
- `model_devi_dt``model_devi_skip`、信任阈值、清理标志和 `model_devi_jobs`
13-
- `fp_style``fp_task_min``fp_task_max` 及后端专用 FP 输入。
10+
- `type_map` (ordered symbols), optional `mass_map`, `init_data_prefix`, and `init_data_sys`;
11+
- `sys_configs_prefix` and `sys_configs` (a list of systems, each a list of structures);
12+
- `numb_models` and complete `default_training_param.model`, `learning_rate`, `loss`, and `training`;
13+
- `model_devi_dt`, `model_devi_skip`, trust thresholds, cleanup flag, and `model_devi_jobs`;
14+
- `fp_style`, `fp_task_min`, `fp_task_max`, and backend-specific FP inputs.
1415

15-
DeePMD-kit 1.x 使用 `training.systems`2.x/3.x 使用
16-
`training.training_data.systems`。将对应版本的 systems 留空,由 DP-GEN 根据
17-
`init_data_sys` 填充。使用版本相关 descriptor 或功能前,核对 `deepmd_version`
18-
和已安装的软件栈。
16+
DeepMD-kit 1.x uses `training.systems`; 2.x/3.x use
17+
`training.training_data.systems`. Leave the version-appropriate value empty so
18+
DP-GEN can fill it from `init_data_sys`. Verify `deepmd_version` and the
19+
installed stack before using version-specific descriptors or features.
1920

20-
`train_backend` 支持 `tensorflow``pytorch`,但实际兼容性仍取决于已安装的
21-
DeePMD-kit 与 descriptor。核对组合并准确拼写 `se_atten_v2`。普通 LAMMPS 探索使用
22-
默认 `model_devi_engine`;替代引擎只有在验证后才能设置。当前 `dpgen run` 不接受
23-
`fp_style: "none"`
21+
`train_backend` accepts `tensorflow` and `pytorch`, but compatibility still
22+
depends on the installed DeePMD-kit and descriptor. Verify the combination;
23+
spell `se_atten_v2` exactly. Ordinary LAMMPS exploration uses the default
24+
`model_devi_engine`; set an alternative only when verified. Current `dpgen run`
25+
does not accept `fp_style: "none"`.
2426

25-
每个 `init_data_sys` 目录必须包含 `type_map.raw``type.raw``set.000/`
26-
每个 `type_map.raw` 必须与 `param.json.type_map` 完全一致。
27+
Each `init_data_sys` directory must contain `type_map.raw`, `type.raw`, and
28+
`set.000/`; every `type_map.raw` must match `param.json.type_map` exactly.
2729

28-
## 2. `machine.json` 要点
30+
## 2. `machine.json` essentials
2931

30-
保持独立的 `train``model_devi``fp` block。每个 block 提供 `command`
31-
`machine``batch_type``context_type``local_root` 以及需要时的
32-
`remote_root`/profile)和 `resources`(节点数、CPU/GPU 数、`group_size`
33-
队列/分区参数及调度器 `source_list`)。通用 local、scheduler 和 SSH 结构见
34-
[machine schema 说明](../../../doc/run/example-of-machine.md)
32+
Keep separate `train`, `model_devi`, and `fp` blocks. Each block supplies a
33+
`command`, `machine` (`batch_type`, `context_type`, `local_root`, and any
34+
required `remote_root`/profile), and `resources` (`number_node`, CPU/GPU counts,
35+
`group_size`, queue/partition flags, and scheduler `source_list`). See the
36+
[repository machine schema walkthrough](../../../doc/run/example-of-machine.md)
37+
for generic local, scheduler, and SSH shapes.
3538

36-
启动 shell 与派发任务处于不同环境。调度器任务必须通过 `source_list` 激活自己的
37-
运行环境,外层激活不会可靠继承。训练命令必须选择与 `train_backend` 相同的后端
38-
(DeePMD-kit 3.x 的 PyTorch 可能需要 `dp --pt`)。应根据已安装的 DPDispatcher
39-
验证命令、context、batch 别名、路径和资源,不要凭经验统一改写。
39+
The launcher shell and dispatched tasks are different environments. Scheduler
40+
jobs must activate their own runtime through `source_list`; outer activation is
41+
not inherited reliably. The training command must select the same backend as
42+
`train_backend` (for DeePMD-kit 3.x PyTorch this may be `dp --pt`). Validate
43+
commands, context types, batch aliases, roots, and resources against installed
44+
DPDispatcher rather than normalizing by assumption.
4045

41-
## 3. 启动前验证生成输入
46+
## 3. Validate generated inputs before launch
4247

4348
```bash
4449
dpgen -h
4550
python -m json.tool param.json
4651
python -m json.tool machine.json
4752
```
4853

49-
`run_jdata_arginfo()` 规范化 `param.json`,用 `convert_mdata()` 转换
50-
`machine.json`。解析所有数据/结构路径,比较 type map,检查可执行文件和调度器权限,
51-
并核对 FP 输入及成本上限。
54+
Normalize `param.json` with `run_jdata_arginfo()` and convert `machine.json` with
55+
`convert_mdata()`. Resolve all data/structure paths, compare type maps, check
56+
executables and scheduler access, and verify FP inputs and cost limits.
5257

53-
提交前逐个检查每个阶段/任务实际生成的 `input.json`。不能从根目录 JSON 推断最终配置:
54-
核对模型数、seed、checkpoint、数据系统、`sys_idx`、温度/压力和最终训练步数。存在
55-
reuse 或迭代 override 时,同时断言默认值和生效值。
58+
Before submission, inspect the generated `input.json` for every stage/task. Do
59+
not infer the effective configuration from the root files: check model count,
60+
seed, checkpoint, data systems, `sys_idx`, temperatures/pressures, and final
61+
training steps. When reuse or iteration overrides exist, assert both the default
62+
and effective values.
5663

57-
将目标迭代与 `record.dpgen`、阶段目录、DPDispatcher work base/提交元数据及日志交叉核对。
58-
仅有目录或 job 并不代表阶段已完成。
64+
Cross-check the intended iteration against `record.dpgen`, stage directories,
65+
DPDispatcher work base/submission metadata, and logs. A stage is not complete
66+
because a directory or job exists.
5967

60-
## 4. 恢复与重启
68+
## 4. Restart and recovery
6169

62-
`record.dpgen` 恢复属于可能产生费用的操作。同一工作目录只能保留一个 controller。
63-
编辑状态前先停止 controller、备份状态文件、记录阶段/job ID 及新旧设置,并查询调度器。
70+
Treat a restart from `record.dpgen` as cost-bearing. Keep one controller for a
71+
work directory. Before editing state, stop it, back up the state file, record
72+
stage/job IDs and old/new settings, and query the scheduler.
6473

65-
活动阶段的 command、context、remote root、队列、资源、`group_size`、flags、激活方式、
66-
任务列表或 common files 变化,都可能产生新的 DPDispatcher submission identity。新 identity
67-
不会导入旧 identity 的完成状态。要区分旧提交恢复和使用新 remote root 的有意重跑;连接超时
68-
本身不是重新提交理由。
74+
A changed active-stage command, context, remote root, queue, resources,
75+
`group_size`, flags, activation, task list, or common files can create a new
76+
DPDispatcher submission identity. It will not import completion state from the
77+
old identity. Distinguish recovery of the old submission from an intentional
78+
rerun with a new remote root; never resubmit solely because a connection timed
79+
out.
6980

70-
恢复的正证据包括旧 submission hash、未变化的 job ID 和恢复日志;同时不能出现新的提交日志。
71-
`record.dpgen` 是工作流指针,不是调度器完成记录。当前计费阶段推进后,才能应用后续迭代的
72-
machine 修改。
81+
Positive recovery evidence is the old submission hash, unchanged job IDs, and a
82+
recovery message; absence of a new-submission message is required.
83+
`record.dpgen` is a workflow pointer, not a scheduler completion record.
84+
Apply later-iteration machine changes only after the current cost-bearing stage
85+
advances.
7386

74-
## 5. 确认与检查
87+
## 5. Confirm and inspect
7588

76-
展示文件、验证摘要、未解决风险和 `dpgen run param.json machine.json`。只有明确确认后才执行。
77-
启动后检查 `iter.*`、阶段日志、失败/等待状态、选中和标注数量,以及
78-
[监控输出](monitoring.md)
89+
Show the exact files, validation summary, unresolved risks, and
90+
`dpgen run param.json machine.json`. Execute only after explicit confirmation.
91+
After launch, inspect `iter.*`, stage logs, failure/pending states, selected and
92+
labeled counts, and [monitoring outputs](monitoring.md).
7993

80-
外部参考:https://docs.deepmodeling.com/projects/dpgen/en/latest/run/index.html
94+
External references: https://docs.deepmodeling.com/projects/dpgen/en/latest/run/index.html

0 commit comments

Comments
 (0)