xnn.common.cli.main#

xnn.common.cli.main(argv=None)[source]#

Command-line entry point dispatching the train, benchmark, export and mdi commands.

The first argument selects the command; the rest are that command’s options. train builds a Config from the arguments, constructs the training/validation datasets, and runs the trainer. benchmark loads a BenchmarkConfig and scores the listed pre-trained models on the dataset, writing a comparison table. export loads a checkpoint into a ForceStressOutput-wrapped model and writes it out for LAMMPS or as TorchScript. mdi serves a checkpoint as an MDI engine (see xnn.common.deploy.mdi_engine). With no arguments a usage line is printed; an unknown command prints an error message.

Parameters:

argv (list of str or None, optional) – Argument vector excluding the program name. When None (the default), sys.argv[1:] is used.

Returns:

This function prints results and has no return value.

Return type:

None