caikit.runtime.client.remote_config
The RemoteModuleConfig is a ModuleConfig subclass used to describe a Module’s interface without referencing the source ModuleBase.
Attributes
Classes
Helper dataclass to store information about a Remote RPC. |
|
Helper class to differentiate a local ModuleConfig and a RemoteModuleConfig. The structure |
Module Contents
- caikit.runtime.client.remote_config.error
- class caikit.runtime.client.remote_config.RemoteRPCDescriptor[source]
Helper dataclass to store information about a Remote RPC.
- request_dm_name: str
- response_dm_name: str
- rpc_name: str
- input_streaming: bool = False
- output_streaming: bool = False
- class caikit.runtime.client.remote_config.RemoteModuleConfig(config_dict)[source]
Bases:
caikit.core.modules.config.ModuleConfigHelper class to differentiate a local ModuleConfig and a RemoteModuleConfig. The structure should contain the following fields/structure
- protocol: str
- model_key: str
- task_methods: List[Tuple[Type[caikit.core.task.TaskBase], List[RemoteRPCDescriptor]]]
- train_method: RemoteRPCDescriptor
- model_path: str
- module_id: str
- module_name: str
- reserved_keys = []
- classmethod load_from_module(module_reference: str | Type[caikit.core.modules.base.ModuleBase] | caikit.core.modules.base.ModuleBase, connection_info: caikit.interfaces.common.data_model.remote.ConnectionInfo, protocol: str, model_key: str, model_path: str) RemoteModuleConfig[source]
Construct a new remote module configuration from an existing local Module
- Args:
- module_reference: Union[str, Type[ModuleBase]]:
Module_reference should either be the id of the locally loaded module, or a module class
- model_path (str):
The path used to load this module
- connection_info ConnectionInfo:
The connection information of the remote to use
- protocol: str
The protocol to connect with
- model_key: str
The model key to use when sending GRPC requests. An example is mm-model-id
- Returns:
model_config (RemoteModuleConfig): Instantiated RemoteModuleConfig for model given model_path.