caikit.core.modules.config ========================== .. py:module:: caikit.core.modules.config Attributes ---------- .. autoapisummary:: caikit.core.modules.config.log caikit.core.modules.config.error Classes ------- .. autoapisummary:: caikit.core.modules.config.ModuleConfig Module Contents --------------- .. py:data:: log .. py:data:: error .. py:class:: ModuleConfig(config_dict) Bases: :py:obj:`aconfig.Config` Config object used by all modules for config loading, saving, etc. .. py:attribute:: reserved_keys :value: ['model_path'] .. py:method:: load(model_path: Union[str, ModuleConfig]) -> ModuleConfig :classmethod: Load a new module configuration from a directory on disk. Args: model_path (Union[str, ModuleConfig]): Path to model directory. At the top level of directory is `config.yml` which holds info about the model. Note that the model_path here is assumed to be operating system correct as a consequence of the way this method is invoked by the model manager. Returns: model_config (ModuleConfig): Instantiated ModuleConfig for model given model_path. .. py:method:: save(model_path) Save this module configuration to a top-level `config.yml` file in the specified model path. Args: str Path to model directory. The `config.yml` file will be written to this location. Notes: `model_path` must already exist! This means you must create the directory outside of this routine.