Base hyperparameters¶
Definitions for the validation of base hyperparameters, i.e. those that are common to all architectures. For a narrative documentation see Training YAML Reference.
Bases:
TypedDictHyperparameters for the systems in the dataset.
Path to the file containing the systems.
The reader library to use for parsing.
If
nullor not provided, the reader will be guessed from the file extension. For example,.xyzand.extxyzwill be read byaseand.mtswill be read bymetatensor.
Unit of lengths in the system file, optional but highly recommended for running simulations. If not given, no unit conversion will be performed when running simulations which may lead to severe errors.
The list of possible length units is available here.
Bases:
TypedDictThe path to the file for gradient data.
If not provided, the path from its associated target is used.
The reader library to use for parsing.
If
nullor not provided, the reader will be guessed from the file extension. For example,.xyzand.extxyzwill be read byaseand.mtswill be read bymetatensor.
The key under which the target is stored in the file.
If not provided, it defaults to the key of the gradient in the yaml dataset specification.
Bases:
TypedDictThe rank of the cartesian target (e.g. 1 for vectors).
Bases:
TypedDictHyperparameters to specify cartesian target types.
Bases:
TypedDict
Bases:
TypedDict
Bases:
TypedDictHyperparameters to specify spherical target types.
Bases:
TypedDictHyperparameters for the targets in the dataset.
The quantity that the target represents (e.g.,
energy,dipole). Currently onlyenergygets a special treatment frommetatrain, for any other quantity there is no need to specify it.
The path to the file containing the target data, defaults to
systems.read_frompath if not provided.
The reader library to use for parsing.
If
nullor not provided, the reader will be guessed from the file extension. For example,.xyzand.extxyzwill be read byaseand.mtswill be read bymetatensor.
The key under which the target is stored in the file.
If not provided, it defaults to the key of the target in the yaml dataset specification.
Unit of the target, optional but highly recommended for running simulations. If not given, no unit conversion will be performed when running simulations which may lead to severe errors.
The list of possible units is available here.
Whether the target is a per-atom quantity, as opposed to a global (per-structure) quantity.
Specifies the type of the target.
See Fitting Generic Targets to understand in detail how to specify each target type.
Specifies the number of sub-targets that need to be learned as part of this target.
Each subtarget is treated as entirely equivalent by models in metatrain and they will often be represented as outputs of the same neural network layer. A common use case for this field is when you are learning a discretization of a continuous target, such as the grid points of a function. In the example above, there are 4000 sub-targets for the density of states (DOS). In metatensor, these correspond to the number of properties of the target.
A description of this target. A description is highly recommended if there is more than one target with the same
quantity.
Specification for the forces associated with the target.
See Gradient Subsection.
Specification for the stress associated with the target.
See Gradient Subsection.
Specification for the virial associated with the target.
See Gradient Subsection.
Bases:
TypedDictPath to the dataset file or a dictionary specifying the dataset.
Additional data to include from the dataset.
Bases:
TypedDictBase hyperparameters for all models.
Architecture-specific hyperparameters.
The computational device used for model training. If not provided,
metatrainautomatically chooses the best option by default. The available devices and the best device option depend on the model architecture. The easiest way to use this parameter is to use either either"cpu","gpu","multi-gpu". Internally, under the choice"gpu", the script will automatically choose between"cuda"or"mps".
The base precision for float values. For example, a value of
16corresponds to the data typefloat16. The datatypes that are supported as well as the default datatype depend on the model architecture used.
The seed used for non-deterministic operations. It sets the seed of
numpy.random,random,torchandtorch.cuda. This parameter is important for ensuring reproducibility. If not specified, the seed is generated randomly and reported in the log.
Configuration for Weights & Biases logging.
If
None, W&B logging is disabled.
Specification of the training dataset.
Specification of the validation dataset.
Specification of the test dataset.