Skip to content

docs(skills): add structured DPA4 workflow support - #5961

Open
SchrodingersCattt wants to merge 21 commits into
deepmodeling:masterfrom
SchrodingersCattt:docs/add-deepmd-dpa4-skill
Open

docs(skills): add structured DPA4 workflow support#5961
SchrodingersCattt wants to merge 21 commits into
deepmodeling:masterfrom
SchrodingersCattt:docs/add-deepmd-dpa4-skill

Conversation

@SchrodingersCattt

@SchrodingersCattt SchrodingersCattt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a dedicated deepmd-finetune-dpa4 skill while preserving deepmd-finetune-dpa3
  • add progressive DPA4/SeZM guidance to deepmd-train
  • document .pt, .pt2, .pth, and .pb inference artifact routing
  • add model deployment and explicit atom-type mapping guidance to lammps-deepmd
  • update the Agent Skills index and verification examples

Design

The skills remain organized by user workflow rather than adding one umbrella DPA4 skill. Because DPA3 and DPA4 checkpoints both use .pt, the fine-tuning skills require inspecting the stored descriptor instead of routing by filename. DPA4-specific guidance covers the public PyTorch/SeZM workflow, LoRA, .pt2 export, Python inference, and LAMMPS deployment.

Validation

  • checked Markdown/frontmatter structure, skill-name consistency, relative links, and JSON snippets
  • ran git diff --check
  • verified that the new material contains no DPA4C or private runtime/platform details
  • attempted CLI validation in Bohrium prebuilt DeePMD sandboxes without installing DeePMD locally; the ch4-deepmd template did not expose dp, while the deepmd-kit-3.2.0-dev sandbox requests timed out before creation

The documented DPA4 commands and behavior are based on this repository's doc/model/dpa4.md, maintained examples, CLI implementation, and DPA4 tests.

Summary by CodeRabbit

  • New Features

    • Added guidance for DPA4/SeZM fine-tuning, including standard and LoRA workflows, validation, and deployment.
    • Added .pt2 model workflows for Python inference, training, and LAMMPS deployment.
    • Added checkpoint identification, backend selection, descriptor and embedding extraction, and compatibility checks.
    • Added deployment guidance for model export, atom-type mapping, spin models, multi-task heads, and production validation.
  • Documentation

    • Expanded examples, verification checklists, configuration guidance, and DeePMD workflow references.
    • Clarified supported model artifacts, runtime requirements, and deployment procedures.

@dosubot dosubot Bot added the Docs label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds DPA4/SeZM skills for training, fine-tuning, Python inference, and LAMMPS deployment. It documents .pt2 workflows, checkpoint inspection, LoRA training, artifact validation, and atom-type mapping.

Changes

DPA4/SeZM skill workflows

Layer / File(s) Summary
Checkpoint routing and skill index
doc/agent-skills.md, skills/deepmd-finetune-dpa4/SKILL.md
Adds the fine-tuning skill and documents checkpoint routing, compatibility checks, and verification.
DPA4 training workflow
skills/deepmd-train/SKILL.md, skills/deepmd-train/models/dpa4.md
Adds DPA4/SeZM model selection, configuration, PyTorch training, .pt2 export, testing, and readiness checks.
DPA4 fine-tuning workflow
skills/deepmd-finetune-dpa4/SKILL.md
Documents standard and LoRA fine-tuning, multi-task branch selection, monitoring, validation, export, and testing.
Inference artifact workflows
skills/deepmd-python-inference/SKILL.md, skills/deepmd-python-inference/references/model-artifacts.md
Documents artifact identification, backend selection, DPA4 loading, descriptor and embedding support, and runtime validation.
LAMMPS deployment guidance
skills/lammps-deepmd/SKILL.md, skills/lammps-deepmd/references/commands-and-workflow.md, skills/lammps-deepmd/references/model-deployment.md
Adds deployment artifact guidance, pinned tool versions, export requirements, atom mapping, and production validation.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: iprozd

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding structured DPA4 workflow documentation to Agent Skills.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

SchrodingersCattt and others added 2 commits August 7, 2026 22:36
Updated the description for the deepmd-finetune-dpa4 skill to simplify language and remove references to SeZM.

Signed-off-by: Ming-Yu Guo <guomy26@mail2.sysu.edu.cn>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/deepmd-finetune-dpa4/SKILL.md`:
- Around line 92-95: Update the LoRA example reference in the training
instructions to use ../../examples/water/dpa4/lora_ft.json, ensuring it resolves
from the skill directory to the repository-level example while preserving the
existing command guidance.
- Around line 27-36: Update skills/deepmd-finetune-dpa4/SKILL.md at lines 27-36,
49-63, and 104-115, skills/deepmd-train/models/dpa4.md at lines 73-84,
skills/deepmd-python-inference/references/model-artifacts.md at lines 63-70, and
skills/lammps-deepmd/references/model-deployment.md at lines 9-15 and 27-36 so
the selected multi-task branch is propagated through training and freezing
workflows, using --model-branch SELECTED_BRANCH for training and --head
SELECTED_BRANCH for freezing or export commands.

In `@skills/deepmd-python-inference/SKILL.md`:
- Around line 31-35: Restrict .pt2 guidance to inference commands and APIs
verified as supported by integration tests. In
skills/deepmd-python-inference/SKILL.md at lines 31-35, 58-60, and 292-293, and
references/model-artifacts.md at lines 17-22, 39-44, and 57-60, remove or revise
any universal .pt2 loading claims and update dp test or dp eval-desc examples to
supported frozen formats or explicit backend flags when .pt2 is unsupported.
Ensure all documented .pt2 paths are consistent with the installed-version
capabilities.

In `@skills/lammps-deepmd/SKILL.md`:
- Line 6: Update the online execution command in the compatibility metadata to
pin both LAMMPS and DeePMD-kit to the tested compatible versions, and apply the
same pins consistently to every command that invokes them.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f040ef9-3491-40d7-a8a4-f8142ef6b61f

📥 Commits

Reviewing files that changed from the base of the PR and between a3195b0 and 979ba46.

📒 Files selected for processing (10)
  • doc/agent-skills.md
  • skills/deepmd-finetune-dpa3/SKILL.md
  • skills/deepmd-finetune-dpa4/SKILL.md
  • skills/deepmd-python-inference/SKILL.md
  • skills/deepmd-python-inference/references/model-artifacts.md
  • skills/deepmd-train/SKILL.md
  • skills/deepmd-train/models/dpa4.md
  • skills/lammps-deepmd/SKILL.md
  • skills/lammps-deepmd/references/commands-and-workflow.md
  • skills/lammps-deepmd/references/model-deployment.md

Comment thread skills/deepmd-finetune-dpa4/SKILL.md
Comment thread skills/deepmd-finetune-dpa4/SKILL.md Outdated
Comment thread skills/deepmd-python-inference/SKILL.md
Comment thread skills/lammps-deepmd/SKILL.md Outdated
@SchrodingersCattt

Copy link
Copy Markdown
Contributor Author

Addressed the review findings in four focused commits:

  • 6e27dc22: clarify .pt2 inference limits; retain verified DeepPot.eval/dp test, remove the unsupported metadata-only .pt2 eval-desc recipe, and state that DPA4 dp embed supports .pt but not .pt2.
  • dc8ec953: fix the LoRA example path and propagate selected multi-task heads through fine-tuning (--model-branch) and export (--head) without changing single-task commands.
  • 92476d3d: distinguish DPA4 edge_vec and NeighborGraph .pt2 contracts, require with-comm metadata/artifact for multi-rank LAMMPS, and document device/toolchain compatibility.
  • 0e24272f: pin all online uvx commands consistently to the published DPA4-capable pair deepmd-kit[gpu,torch,lmp]==3.2.0b0 and lammps==2025.7.22.2.0.

Validation: relative links and JSON examples checked, unsupported .pt2 eval-desc command absent, git diff --check passes, and skills/deepmd-finetune-dpa3/SKILL.md still matches upstream exactly.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/deepmd-python-inference/references/model-artifacts.md`:
- Around line 71-77: Update the `dp embed` example to pass `--head
SELECTED_BRANCH` when extracting embeddings from multi-task pretrained
checkpoints, preserving the intended fitting head; alternatively, explicitly
document that the example is single-head-only.
- Around line 54-57: Update the DeepPot.eval and dp test coverage statement in
model-artifacts.md to clarify that atomic virial is available only when the
archive was exported with --atomic-virial, rather than implying it is always
supported; keep the other covered outputs unchanged.

In `@skills/lammps-deepmd/SKILL.md`:
- Around line 48-52: Update the local command-line help instruction in SKILL.md
by removing the `tee /dev/tty` pipeline from the `lmp -h` command, so it writes
directly to standard output and works without a controlling terminal.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de465679-0ebf-4de7-a9c3-863538ed52fd

📥 Commits

Reviewing files that changed from the base of the PR and between 979ba46 and c41e68a.

📒 Files selected for processing (6)
  • skills/deepmd-finetune-dpa4/SKILL.md
  • skills/deepmd-python-inference/SKILL.md
  • skills/deepmd-python-inference/references/model-artifacts.md
  • skills/deepmd-train/models/dpa4.md
  • skills/lammps-deepmd/SKILL.md
  • skills/lammps-deepmd/references/model-deployment.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/deepmd-train/models/dpa4.md
  • skills/deepmd-python-inference/SKILL.md

Comment thread skills/deepmd-python-inference/references/model-artifacts.md Outdated
Comment thread skills/deepmd-python-inference/references/model-artifacts.md
Comment thread skills/lammps-deepmd/SKILL.md Outdated
@SchrodingersCattt

Copy link
Copy Markdown
Contributor Author

Addressed the latest review comments in two focused commits:

  • adc86165: qualify atomic virial by the archive's do_atomic_virial metadata and add --head SELECTED_BRANCH to the multi-task DPA4 embedding example. The wording reflects current source behavior: ordinary non-spin dp --pt freeze exports atomic virial by default, while specialized spin/conversion routes may not.
  • 263c3408: remove both tee /dev/tty pipelines so pinned lmp -h commands write directly to stdout in non-interactive environments.

Validation: git diff --check, focused assertions for the metadata/head/help changes, editor diagnostics, and confirmation that skills/deepmd-finetune-dpa3/SKILL.md still matches upstream.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.50%. Comparing base (90aec0a) to head (0807ca6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5961      +/-   ##
==========================================
- Coverage   79.77%   79.50%   -0.28%     
==========================================
  Files        1085     1085              
  Lines      127148   127148              
  Branches     4598     4592       -6     
==========================================
- Hits       101428   101083     -345     
- Misses      24067    24411     +344     
- Partials     1653     1654       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@njzjz
njzjz requested a review from iProzd August 7, 2026 17:36
Document how to obtain and verify compatible DPA4 checkpoints, decide between standard fine-tuning and LoRA, inspect active adapter state, distinguish merged best checkpoints, and avoid the incompatible bundled checkpoint/example pairing.
@SchrodingersCattt
SchrodingersCattt marked this pull request as draft August 8, 2026 00:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/deepmd-finetune-dpa4/SKILL.md`:
- Around line 104-111: Update the checker around model_dict, lora, and the
use_lora diagnostic to inspect each dictionary in multi-task branches for a lora
setting. Treat LoRA as enabled when either the top-level model.lora or any
branch-level lora is present, report that combined status, and reject multi-task
configurations whenever branch-level or top-level LoRA is detected.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c666cc7-3e45-49bc-9ca7-08963dd0c3b3

📥 Commits

Reviewing files that changed from the base of the PR and between 263c340 and 588023c.

📒 Files selected for processing (1)
  • skills/deepmd-finetune-dpa4/SKILL.md

Comment thread skills/deepmd-finetune-dpa4/SKILL.md Outdated
Remove smoke-model-specific discussion and detailed checkpoint inspection scripts, retaining concise general requirements for checkpoint selection and LoRA usage.
@SchrodingersCattt
SchrodingersCattt marked this pull request as ready for review August 8, 2026 06:02
Signed-off-by: weiqichen77 <weiqchen@hku.hk>
@weiqichen77
weiqichen77 force-pushed the docs/add-deepmd-dpa4-skill branch from e188dd4 to f42fdde Compare August 9, 2026 00:54
@iProzd iProzd added the P2 Non-blocking DPA4/DPA4C release follow-up. label Aug 10, 2026
@njzjz njzjz added this to the v3.2.0 milestone Aug 10, 2026

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new skill set has a clear separation between scientific setup and platform orchestration, but the documented platform path can currently validate missing inputs, submit jobs without durable output collection or a wall-time limit, and accept empty logs as successful. The LoRA instructions can also discard an explicitly selected fitting head when the source checkpoint is multi-task. These are blocking workflow/data-retention issues; the inline comments include two direct suggestions and concrete exit-status reproductions.

Codex quota is about to reset, so I am using the remaining token budget to complete a concentrated review pass over the outstanding PRs.

Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh

Comment thread skills/matmaster-dpa4-workflows/scripts/check_environment.py Outdated
Comment thread skills/matmaster-dpa4-workflows/SKILL.md Outdated
Comment thread skills/deepmd-finetune-dpa4/SKILL.md
Comment thread skills/matmaster-dpa4-workflows/scripts/audit_cases.py Outdated
@OutisLi
OutisLi self-requested a review August 14, 2026 08:48

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Make required capability probes fail on a nonzero exit status

skills/matmaster-dpa4-workflows/scripts/check_environment.py currently treats executable discoverability as capability success. I reproduced this with a fake dp on PATH that exits 42: --probe --require-deepmd reports available: true, returncode: 42, and failures: [], then exits 0. A broken or incompatible DeePMD/LAMMPS/Bohrium runtime can therefore pass the validation gate and let automation continue packaging or submitting the job.

Please define required capability usability from the probe result when --probe is active (for example, discovered and returncode == 0) and apply that same predicate consistently to bohr, dp, and the lmp/lmp_mpi alternatives. A regression test with a discoverable executable returning nonzero would pin the contract.

@OutisLi-Bot OutisLi-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Prior P1s on f42fddeb look fixed on bbe64e03. I re-checked the current head against the CLI and the three MatMaster scripts. No remaining documented-path blocker.

The DPA4 skills match the public PyTorch/SeZM workflow: inspect the stored descriptor (do not trust .pt), keep DPA3 on its own skill, freeze via dp --pt freeze to .pt2, keep dp embed on checkpoints, and fail closed on multi-rank .pt2 without has_comm_artifact / forward_lower_with_comm.pt2. Multi-task --model-branch / --head is now present on standard finetune, LoRA, freeze, and embed.

check_environment.py now fails on a missing model, case dir, or required file. audit_cases.py now rejects empty logs. The MatMaster skill example now passes --max-run-time and repeated --backward values.

Non-blocking

  1. make_job_spec.py still accepts a spec with no wall time and backward_files=[] if --max-run-time / --backward are omitted. The skill text is the agent contract and is now correct; requiring a positive --max-run-time and at least one --backward in the generator would close the remaining hole.
  2. The three new scripts (check_environment.py, audit_cases.py, make_job_spec.py) have no tests.
  3. The top-level skills/lammps-deepmd/SKILL.md NVT example still uses graph_compressed.pb, implicit pair_coeff * *, and no atom_modify map yes. DPA4-specific guidance in model-deployment.md and examples/water/dpa4/lmp/in.lammps is correct; agents that copy the top-level NVT template for DPA4 will miss the atom map.

I did not re-run DPA4 train/freeze (CPU-only box). CLI help, relative links, git diff --check, and the script exit-status cases all passed.

Verdict: comment (approve-leaning). Prior CHANGES_REQUESTED can be considered addressed.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Keep required case files inside the packaged case directory

skills/matmaster-dpa4-workflows/scripts/check_environment.py documents --require-file as case-relative, but currently checks (case / name).is_file() without enforcing that boundary. I reproduced a successful exit with --case-dir parent/case --require-file ../model.pt when model.pt exists beside the case: the report marks both run.sh and ../model.pt present and leaves failures empty. An absolute path behaves the same way.

Bohrium packages only the directory passed as --input_directory, so this gate can validate a model/input that will not exist in the remote workspace. Please reject absolute paths and any resolved required path outside case_dir (including symlink escapes), retain normalized relative names in the report, and add regression coverage for .. and absolute-path inputs.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented non-submitting validation command is not a verified Bohrium CLI interface. The current official bohr job submit documentation does not list either --dry-run or --output, and the available CLI reproduces this as Error: unknown flag: --dry-run; its submit help lists neither option. Therefore the workflow safety gate cannot run as written. Line 54 then tells the agent to remove --dry-run only for production, but there is no supported validation path before that production submission.

Please do not encode an unverified version-specific CLI contract. Use a version-verified, genuinely non-submitting validation interface if Bohrium provides one; otherwise keep the local job-spec/input checks as validation and leave the actual bohr job submit strictly behind explicit user authorization. If 2.5.17 really supports these flags, please add an authoritative reference or executable test that establishes that contract. Current CLI reference: https://bohrium-doc.dp.tech/docs/bohrctl/job/

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audit_cases.py silently scans only the first 50,000,000 characters of each log. Any fatal signature after that boundary is ignored, so a failed long-running job can be reported as passes_file_audit with exit status 0.

I reproduced this with a 50,000,077-byte run.log in train mode whose final lines are Traceback (most recent call last): and RuntimeError: failed after long training. The script returned passes_file_audit, reasons: [], fatal_signatures: [], and exit code 0. The report warning about scientific acceptance does not make this safe, because this is a false result for the fatal-signature audit itself.

Please scan logs incrementally with bounded memory while accumulating fatal signatures, completion markers, and the last energy, rather than truncating the log. Reading only head plus tail would still miss failures in the middle. Please also add a regression test with a fatal signature beyond the current 50 MB boundary.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audit_cases.py can return success while expected cases are completely absent. The earlier in.lmp reproduction is one symptom: infer_mode() recognizes in.lmp, but marker-based find_case_dirs() does not. More fundamentally, any submitted case whose download failed, whose directory is empty, or whose files use an unlisted name has no marker and therefore disappears from case_count instead of being reported as missing.

I reproduced the concrete false pass with one valid training case plus a second directory containing only in.lmp and no log. The report contained only the valid case, returned case_count: 1, passes_file_audit: 1, and exited 0. Adding in.lmp to the marker tuple would fix only this filename and leave absent or empty expected cases invisible.

The workflow already requires a manifest that records every case. Please make the completeness-sensitive audit manifest-driven, or accept an explicit repeatable expected-case list, and iterate those case directories even when they contain no recognized files. Marker discovery can remain an optional convenience mode, but it must not produce a successful completeness verdict without an expected inventory. Add regression coverage for an absent case directory, an empty case directory, and an in.lmp case without a log alongside a valid case; all must remain visible and make the audit fail.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make_job_spec.py describes itself as generating and validating a Bohrium job specification, but it accepts any --result-path and writes it unchanged. The Bohrium bohr job submit contract limits automatic result destinations to /personal or /share: https://bohrium-doc.dp.tech/docs/bohrctl/job/

I reproduced this with --result-path /tmp/ephemeral-results; the script exited 0 and emitted that value into job.json. The generated specification therefore violates both the platform contract and this skill requirement that results use durable storage.

Please validate the normalized path before writing the specification. It must be /personal, /share, or a descendant of one of those directories. Use path-component containment rather than a raw string prefix so values such as /personal-old/run are rejected. Please cover valid durable paths plus /tmp/result, /personal-old/run, and a relative path in regression tests.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audit_cases.py --require does not enforce its documented case-relative boundary. match_required() passes the user pattern directly to case.glob(), so .. and symlink traversal can satisfy a required output with a file outside the audited case.

I reproduced this with root/checkpoint.pt and root/case/run.log, where the case itself has no checkpoint. Running the audit with --mode train --require ../checkpoint.pt returned passes_file_audit, exit code 0, and recorded ../checkpoint.pt as the successful match.

This is the same containment invariant that check_environment.py --require-file needs. Please avoid two local patches: introduce one shared case-path containment helper used by both scripts. It should reject absolute paths and parent traversal, and verify every resolved match remains under the resolved case directory so symlink escapes are rejected as well. Please test ordinary exact paths, globs, .., absolute paths, and symlink escapes.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned online environment cannot provide the multi-rank DPA4 behavior documented by this PR. skills/lammps-deepmd/SKILL.md installs deepmd-kit==3.2.0b0, but the v3.2.0b0 PT freezer hard-codes has_comm_artifact: False and never embeds model/extra/forward_lower_with_comm.pt2: https://github.com/deepmodeling/deepmd-kit/blob/v3.2.0b0/deepmd/pt/entrypoints/freeze_pt2.py#L253-L264. The C++ runtime in that same tag rejects multi-rank message-passing inference when this artifact is absent. This directly contradicts model-deployment.md, which says the ordinary PT freeze carries the with-comm artifact and supports multi-rank LAMMPS out of the box.

Do not replace this with another fixed DeePMD-kit release. These DPA4/PT/PT-expt capabilities are evolving on upstream/master, so the skill should use the latest master source and record the resolved commit SHA in the execution/provenance report. Resolve a LAMMPS version compatible with that checkout rather than forcing DeePMD-kit back to the old beta pin. If the master bootstrap needs a separate installation step instead of the current one-line uvx command, document that explicitly; the recommended environment must actually implement every deployment capability claimed by the skill.

@OutisLi OutisLi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Agent responsibilities list in skills/lammps-deepmd/SKILL.md has lost its hierarchy. Under Confirm the minimum simulation inputs, only the structure/data file remains nested; the model artifact, type mapping, ensemble, and run parameters at lines 28-31 are top-level bullets, after which the numbered responsibility list resumes. The rendered document therefore splits one input contract across two unrelated list levels and reads like a patch residue.

Please indent all minimum-input bullets under the same numbered responsibility and make their punctuation/line wrapping consistent, so this section has one clear hierarchy for both human readers and agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs P2 Non-blocking DPA4/DPA4C release follow-up. Python

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

7 participants