Configuration and presets ========================= Packaged presets ---------------- ``Config.preset(model, dataset)`` combines a model YAML, a dataset YAML, and the shared trainer preset. The supported datasets are ``taxi``, ``taobao``, ``amazon``, ``retweet``, and ``stackoverflow``. Model names are case-sensitive; see :doc:`/technical/models/index` for the eleven registered IDs. .. code-block:: python from easy_tpp.config_factory import Config from easy_tpp.runner import Runner config = Config.preset( "NHP", "taxi", overrides=["trainer_config.max_epoch=5", "trainer_config.gpu=-1"], base_dir="./checkpoints/", ) Runner.build_from_config(config).run() Overrides --------- ``overrides`` accepts either a nested dictionary or a list of OmegaConf ``path=value`` strings. Paths use the assembled config sections: ``base_config``, ``data_config``, ``trainer_config``, and ``model_config``. For example, set ``data_config.data_specs.rescale_time=true``, or supply ``{"trainer_config": {"batch_size": 32}}`` as a dictionary. ``apply_overrides(config_dict, dotlist)`` also returns a fresh merged dictionary without changing its input. YAML experiment files use a ``data`` mapping and named experiment blocks as shown in :doc:`training`. Early stopping -------------- The shared preset caps training at 100 epochs and sets ``trainer_config.early_stopping_patience: 10``. The patience counts validation checks without improvement in validation log-likelihood, not training epochs. ``valid_freq`` controls validation frequency. The standard runner saves the best validation checkpoint. Set patience to ``null`` to disable early stopping; the bare trainer schema defaults to disabled. .. literalinclude:: ../../../easy_tpp/configs/trainer/default.yaml :language: yaml Schema warnings --------------- Typed sections validate values with OmegaConf. Unknown keys issue a ``FutureWarning`` containing the full config path and, when possible, a suggested spelling; they are ignored in the current implementation. The warning announces errors in 0.6.0. Values are coerced where possible and invalid types raise ``ValueError``. Free-form ``model_specs`` dictionaries remain unrestricted. Read warnings before launching a long run. See :doc:`/api/config` for the configuration classes.