Skip to content

Add export_valid_split: write the valid_ratio split as GPUMD-ready files - #4

Merged
mushroomfire merged 1 commit into
masterfrom
split-export
Aug 6, 2026
Merged

Add export_valid_split: write the valid_ratio split as GPUMD-ready files#4
mushroomfire merged 1 commit into
masterfrom
split-export

Conversation

@mushroomfire

Copy link
Copy Markdown
Owner

export_valid_split(data_file, valid_ratio, run_seed, output_dir) writes train.xyz + test.xyz reproducing exactly the split that train_nep(valid_ratio=..., run_seed=...) uses internally, with frames copied verbatim (raw text, untouched fields/precision) in input-file order - so the same data partition can be trained in GPUMD and the loss curves compared directly.

The split draw is factored into data.valid_split_indices and both trainers now call it, so the trainers and the export can never disagree. Test: reference energies in energy_test.out from a valid_ratio run equal the exported test.xyz energies row for row; partition is verbatim and deterministic.

Also restores train_sharded's 'from .data import' line that a refactor script had accidentally dropped (unreleased; DDP smoke test re-run and passing).

export_valid_split(data_file, valid_ratio, run_seed, output_dir) writes
train.xyz + test.xyz reproducing exactly the split that
train_nep(valid_ratio=..., run_seed=...) uses internally, with frames
copied verbatim (raw text, untouched fields/precision) in input-file
order - so the same data partition can be trained in GPUMD and the
loss curves compared directly.

The split draw is factored into data.valid_split_indices and both
trainers now call it, so the trainers and the export can never
disagree. Test: reference energies in energy_test.out from a
valid_ratio run equal the exported test.xyz energies row for row;
partition is verbatim and deterministic.

Also restores train_sharded's 'from .data import' line that a
refactor script had accidentally dropped (unreleased; DDP smoke test
re-run and passing).
@mushroomfire
mushroomfire merged commit 616d150 into master Aug 6, 2026
@mushroomfire
mushroomfire deleted the split-export branch August 6, 2026 17:08
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