caikit ====== .. py:module:: caikit .. autoapi-nested-parse:: CAIKit is an AI toolkit that enables AI users to consume stable task-specific model APIs while enabling AI developers build algorithms and models in a modular/composable framework. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/caikit/_version/index /autoapi/caikit/config/index /autoapi/caikit/core/index /autoapi/caikit/interfaces/index /autoapi/caikit/runtime/index /autoapi/caikit/version/index Attributes ---------- .. autoapisummary:: caikit.extract caikit.get_model_future caikit.get_prediction_future caikit.load caikit.resolve_and_load caikit.train caikit.__version__ Functions --------- .. autoapisummary:: caikit.configure caikit.get_config caikit.module Package Contents ---------------- .. py:function:: configure(config_yml_path: Optional[str] = None, config_dict: Optional[Dict[str, Any]] = None) Configure caikit for your usage! Merges into the internal aconfig.Config object with overrides from multiple sources. Sources, last takes precedence: 1. The existing configuration from calls to `caikit.configure()` 2. The config from `config_yml_path` 3. The config from `config_dict` 4. The config files specified in the `config_files` configuration (NB: This may be set by the `CONFIG_FILES` environment variable) 5. Environment variables, in ALL_CAPS_SNAKE_FORMAT Args: config_yml_path (Optional[str]): The path to the base configuration yaml with overrides for your usage. config_dict (Optional[Dict]): Config overrides in dictionary form Returns: None: This only sets the config object that is returned by `caikit.get_config()` .. py:function:: get_config() -> aconfig.Config Get the caikit configuration .. py:data:: extract .. py:data:: get_model_future .. py:data:: get_prediction_future .. py:data:: load .. py:function:: module(id=None, name=None, version=None, task: Type[caikit.core.task.TaskBase] = None, tasks: Optional[List[Type[caikit.core.task.TaskBase]]] = None, backend_type='LOCAL', base_module: Union[str, Type[caikit.core.modules.base.ModuleBase]] = None, backend_config_override: Optional[Dict] = None) Apply this decorator to any class that should be treated as a caikit module (i.e., extends`{caikit.core.ModuleBase}) and registered with caikit.core so that the library "knows" the class is a caikit module and is capable of loading instances of the module. Args: id: str A UUID to use when registering this module with caikit.core Not required if based on another caikit module using `base_module` name: str A human-readable name for the module Not required if based on another caikit module using `base_module` version: str A SemVer for the module Not required if based on another caikit module using `base_module` task: Type[TaskBase] An ML task class that this module is an implementation for Not required if based on another caikit module using `base_module`, or if multiple tasks are specified using `tasks`. tasks: Optional[List[Type[TaskBase]] List of ML task classes that this module implements. backend_type: backend_type Associated backend type for the module. Default: `LOCAL` base_module: str | ModuleBase If this module is based on a different caikit module, provide name of the base module. Default: None backend_config_override: Dict Dictionary containing configuration required for the specific backend. Default: None Returns: A decorated version of the class to which it was applied, after registering the class as a valid module with caikit.core .. py:data:: resolve_and_load .. py:data:: train .. py:data:: __version__ :value: 'unknown'