Skip to content

[codex] Support torchnep training plots - #127

Merged
Tingliangstu merged 1 commit into
mainfrom
codex/support-torchnep-plot
Jun 30, 2026
Merged

Tingliangstu merged 1 commit into
mainfrom
codex/support-torchnep-plot

Conversation

@Tingliangstu

Copy link
Copy Markdown
Collaborator

Summary

Adds torchnep compatibility to pesmaker plot train while preserving the existing GPUMD/NEP plotting path.

Changes

  • Detect torchnep training output from output.log or the torchnep loss.out header.
  • Parse torchnep loss.out files with a text header and plot the two training stages separately in the loss panel using solid and dashed segments, plus a Stage 2 marker.
  • Report torchnep explicitly in the CLI summary, including the Stage 2 start epoch and total epochs.
  • Filter tensor parity rows with missing labels (nan) so torchnep runs without virial/stress labels still produce valid energy and force plots.
  • Allow --source to point at an output file path by resolving to its parent directory, and auto-detect an output/ directory candidate.
  • Add regression coverage for two-stage torchnep outputs.

Validation

  • python -m pytest tests\test_training_nep.py
  • python -m pytest
  • PYTHONPATH=src python -m pesmaker plot train --source \\wsl.localhost\Ubuntu-24.04\home\tingliang\software\my_GPUMD\GPUMD\torchnep\example\PbTe\output --output-dir %TEMP%\pesmaker_torchnep_plot_check

@Tingliangstu
Tingliangstu marked this pull request as ready for review June 30, 2026 04:57
@Tingliangstu
Tingliangstu merged commit cbb11a6 into main Jun 30, 2026
2 checks passed
@Tingliangstu
Tingliangstu deleted the codex/support-torchnep-plot branch October 20, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant