caikit
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.
Subpackages
Submodules
Attributes
Functions
|
Configure caikit for your usage! |
|
Get the caikit configuration |
|
Apply this decorator to any class that should be treated as a caikit module |
Package Contents
- caikit.configure(config_yml_path: str | None = None, config_dict: Dict[str, Any] | None = None)[source]
Configure caikit for your usage! Merges into the internal aconfig.Config object with overrides from multiple sources.
- Sources, last takes precedence:
The existing configuration from calls to caikit.configure()
The config from config_yml_path
The config from config_dict
- The config files specified in the config_files configuration
(NB: This may be set by the CONFIG_FILES environment variable)
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()
- caikit.extract
- caikit.get_model_future
- caikit.get_prediction_future
- caikit.load
- caikit.module(id=None, name=None, version=None, task: Type[caikit.core.task.TaskBase] = None, tasks: List[Type[caikit.core.task.TaskBase]] | None = None, backend_type='LOCAL', base_module: str | Type[caikit.core.modules.base.ModuleBase] = None, backend_config_override: Dict | None = None)[source]
- 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
- caikit.resolve_and_load
- caikit.train
- caikit.__version__ = 'unknown'