reVeal.config.config.load_config#

load_config(config, config_class)[source]#

Load config to specified pydantic model.

Parameters:
  • config ([dict, BaseModelStrict]) – Input configuration. If a dictionary, it will be converted to an instance of CharacterizeConfig, with validation. If a CharacterizeConfig, the input will be returned unchanged.

  • config_class (type) – Config class to return. Should be a subclass of BaseModelStrict.

Returns:

BaseModelStrict – Output instance of config class.

Raises:

TypeError – A TypeError will be raised if the input is neither a dict nor an instance of the input config_class.