Supported YAML Tags

Supported YAML Tags#

YAML allows defining custom so-called tags which can be distinguished during loading and serialization of objects. paramspace makes heavy use of this possibility, as it greatly simplifies the definition and usage of configuration files.


Are there more YAML tags?

Under the hood, this package uses the yayaml package, which provides a wide range of other YAML tags. See its documentation for a list of added tags and what they do.

Parameter Space Tags#

The paramspace.yaml module implements constructors and representers for the following classes:

This is a convenient and powerful way of defining these objects, right in the YAML file. For instance, this approach is used in the Utopia framework to define sweeps over model parameters.

For example:


For the ParamDim and derived classes, there additionally are the !sweep-default and !coupled-sweep-default tags. These do not create a ParamDim objects but directly return the default value. By adding the -default in the end, they can be quickly deactivated inside the configuration file (as an alternative to commenting them out).