docs: add CALYPSO model deviation arginfo - #1887
Conversation
Add CALYPSO-specific model deviation argument metadata and normalize single-item list values used by existing CALYPSO examples before generating input.dat files. This keeps the generated docs aligned with runtime behavior. Authored by OpenClaw (version: 2026.5.28, model: custom-chat-jinzhezeng-group/gpt-5.5)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1887 +/- ##
==========================================
+ Coverage 49.80% 50.10% +0.29%
==========================================
Files 83 83
Lines 14986 15023 +37
==========================================
+ Hits 7464 7527 +63
+ Misses 7522 7496 -26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughAdds a complete ChangesCALYPSO Engine Schema and Input Normalization
Sequence Diagram(s)sequenceDiagram
participant run.py
participant _normalize_calypso_pressures
participant _make_model_devi_native_calypso
participant _normalize_calypso_scalar
run.py->>_normalize_calypso_pressures: cur_job.get("PSTRESS", [0.0001])
_normalize_calypso_pressures-->>run.py: normalized pressure list
run.py->>_make_model_devi_native_calypso: job dict, work path per pressure
_make_model_devi_native_calypso->>_normalize_calypso_scalar: scalar fields (PsoRatio, PopSize, etc.)
_normalize_calypso_scalar-->>_make_model_devi_native_calypso: unwrapped scalar
_make_model_devi_native_calypso->>_normalize_calypso_pressures: PSTRESS field
_normalize_calypso_pressures-->>_make_model_devi_native_calypso: pressure list
_make_model_devi_native_calypso-->>run.py: writes input.dat
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Verdict: Two blocking issues remain; do not merge yet. Because this PR was opened by the active njzjz-bot account, GitHub does not allow the author to submit a REQUEST_CHANGES review, so this COMMENT review records the blocking findings. The scalar/singleton-list normalization is a good direction and the targeted CALYPSO tests pass, but the schema omits runtime-required fields and external-input mode lacks conditional validation.
Note: The Codex quota is about to reset, so I am using the remaining tokens to review all open PRs in this repository.
Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh
| Argument( | ||
| "model_devi_max_iter", int, optional=True, doc=doc_model_devi_max_iter | ||
| ), | ||
| Argument("vsc", bool, optional=True, default=False, doc=doc_vsc_mode), |
There was a problem hiding this comment.
[Blocking] The CALYPSO variant ends here, but the labeling stage still unconditionally reads model_devi_skip, model_devi_f_trust_lo, and model_devi_f_trust_hi in the FP configuration path. A minimal configuration generated from this arginfo can pass schema validation and then fail with KeyError during FP selection. Please add the common model-deviation post-processing fields (including applicable clean/adaptive/virial settings and defaults), preferably via a shared LAMMPS/CALYPSO helper, and add a regression test that reaches FP using only schema-required fields.
| ), | ||
| Argument("calypso_input_path", str, optional=True, doc=doc_calypso_input_path), | ||
| Argument( | ||
| "model_devi_max_iter", int, optional=True, doc=doc_model_devi_max_iter |
There was a problem hiding this comment.
[Blocking] The documentation says model_devi_max_iter is required in calypso_input_path mode, but this still allows it to be omitted. The runtime uses jdata.get("model_devi_max_iter"); a missing value does not trigger the existing except KeyError and instead fails at iter_index > None with TypeError. Add explicit conditional validation before iteration and a missing-value test. Making the field globally required would not be correct because native-job mode does not need it.
Summary
model_devi_engineargument metadata for generated configuration docs.input.dat.PSTRESSvalues by normalizing them to the pressure list used for CALYPSO work directories.Context
This follows up on #1795. While reviewing that PR, I found two issues:
PopSize: [5]andfmax: [0.01]) were not normalized before reachingmake_calypso_input(), which expects scalar values.Tests
uvx pre-commit run --files dpgen/generator/arginfo.py dpgen/generator/lib/make_calypso.py dpgen/generator/run.py tests/generator/test_calypso.pyuv run --with pytest pytest tests/generator/test_calypso.py -qAuthored by OpenClaw (version: 2026.5.28, model: custom-chat-jinzhezeng-group/gpt-5.5)
Summary by CodeRabbit
New Features
Tests