Skip to content

Handle RunDPTrain when expanded training systems are empty #371

Description

@SchrodingersCattt

Problem

RunDPTrain.execute() can still launch dp train with no training systems. This happens when a pretrained init_model is supplied, init_data is empty, and the latest iter_data entry exists but expands to zero systems. Because the raw iter_data list is non-empty, skip_training() does not apply.

In that state, the generated input contains:

{
  "systems": [],
  "auto_prob": "prob_sys_size"
}

and dp train is invoked. PR #368 fixes invalid empty probability ranges, but the fully empty case needs an explicit workflow policy rather than another probability fallback.

Expected behavior

Detect the absence of expanded training systems before invoking DeePMD-kit, then either:

  • skip training and propagate the supplied init_model, consistent with the existing no-iter_data path; or
  • fail early with a clear FatalError explaining that there is no data to train on.

The chosen behavior should be covered by an end-to-end regression test that verifies dp train is not launched with training_data.systems == [].

Reproduction context

  • init_model: supplied pretrained model
  • init_data: []
  • iter_data: a non-empty list whose latest entry expands to zero systems
  • init_model_policy: "yes"

Related review discussion: #368 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions