zea.setup_config

zea.setup_config(config_path=None, verbose=True, disable_config_check=False, loader=<class 'yaml.loader.FullLoader'>, **kwargs)[source]

Setup function for config. Retrieves config file and checks for validity.

Parameters:
  • config_path (str) – file path to config yaml. Defaults to None. if None, argparser is checked. If that is None as well, the window ui will pop up for choosing the config file manually. Besides a local path it can also be a Hugging Face repository path, in the form hf://<repo_id>/<path_to_config>. For example: hf://username/zeahub/configs/config_camus.yaml.

  • verbose (bool) – print config file path and git summary. Defaults to True.

  • disable_config_check (bool) – whether to check for zea config validity. Defaults to False. Can be set to True if you are using some other config that does not have to adhere to zea config standards.

  • loader (yaml.Loader, optional) – yaml loader. Defaults to yaml.FullLoader. for custom objects, you might want to use yaml.UnsafeLoader.

  • **kwargs – Additional keyword arguments forwarded to Config.from_path for hf:// configs, for example repo_type or revision.

Returns:

config object / dict.

Return type:

config (dict)