hydra_zen.load_from_yaml#
- hydra_zen.load_from_yaml(file_)[source]#
Load a config from a yaml-format file
This is an alias of
omegaconf.OmegaConf.load
.- Parameters:
- file_str | pathlib.Path | IO[Any]
The path to the yaml-formatted file, or the file object, that the config will be loaded from.
- Returns:
- loaded_confDictConfig | ListConfig
See also
save_as_yaml
Save a config to a yaml-format file.
to_yaml
Serialize a config as a yaml-formatted string.
References
Examples
>>> from hydra_zen import make_config, save_as_yaml, load_from_yaml
Basic usage
>>> Conf = make_config(a=1, b="foo") >>> save_as_yaml(Conf, "test.yaml") # file written to: test.yaml >>> load_from_yaml("test.yaml") {'a': 1, 'b': 'foo'}