deepmd.pt_expt.entrypoints.main#

Training entrypoint for the pt_expt backend.

Attributes#

Functions#

get_trainer(→ deepmd.pt_expt.train.training.Trainer)

Build a training.Trainer from a normalised config.

train(→ None)

Run training with the pt_expt backend.

freeze(→ None)

Freeze a pt_expt checkpoint into a .pte exported model.

main(→ None)

Entry point for the pt_expt backend CLI.

Module Contents#

deepmd.pt_expt.entrypoints.main.log[source]#
deepmd.pt_expt.entrypoints.main.get_trainer(config: dict[str, Any], init_model: str | None = None, restart_model: str | None = None) deepmd.pt_expt.train.training.Trainer[source]#

Build a training.Trainer from a normalised config.

deepmd.pt_expt.entrypoints.main.train(input_file: str, init_model: str | None = None, restart: str | None = None, skip_neighbor_stat: bool = False, output: str = 'out.json') None[source]#

Run training with the pt_expt backend.

Parameters:
input_filestr

Path to the JSON configuration file.

init_modelstr or None

Path to a checkpoint to initialise weights from.

restartstr or None

Path to a checkpoint to restart training from.

skip_neighbor_statbool

Skip neighbour statistics calculation.

outputstr

Where to dump the normalised config.

deepmd.pt_expt.entrypoints.main.freeze(model: str, output: str = 'frozen_model.pte', head: str | None = None) None[source]#

Freeze a pt_expt checkpoint into a .pte exported model.

Parameters:
modelstr

Path to the checkpoint file (.pt).

outputstr

Path for the output .pte file.

headstr or None

Head to freeze in multi-task mode (not yet supported).

deepmd.pt_expt.entrypoints.main.main(args: list[str] | argparse.Namespace | None = None) None[source]#

Entry point for the pt_expt backend CLI.

Parameters:
argslist[str] | argparse.Namespace | None

Command-line arguments or pre-parsed namespace.