caikit.runtime.client.remote_model_initializer ============================================== .. py:module:: caikit.runtime.client.remote_model_initializer .. autoapi-nested-parse:: The RemoteModelInitializer loads a RemoteModuleConfig as an empty Module that sends all requests to an external runtime server Configuration for RemoteModelInitializer lives under the config as follows: model_management: initializers: : type: REMOTE Attributes ---------- .. autoapisummary:: caikit.runtime.client.remote_model_initializer.log caikit.runtime.client.remote_model_initializer.error Classes ------- .. autoapisummary:: caikit.runtime.client.remote_model_initializer.RemoteModelInitializer Module Contents --------------- .. py:data:: log .. py:data:: error .. py:class:: RemoteModelInitializer(config: aconfig.Config, instance_name: str) Bases: :py:obj:`caikit.core.model_management.model_initializer_base.ModelInitializerBase` A class can be constructed by a factory if its constructor takes exactly one argument that is an aconfig.Config object and it has a name to identify itself with the factory. .. py:attribute:: __doc__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ The RemoteModelInitializer loads a RemoteModuleConfig as an empty Module that sends all requests to an external runtime server Configuration for RemoteModelInitializer lives under the config as follows: model_management: initializers: : type: REMOTE """ .. raw:: html
.. py:attribute:: name :value: 'REMOTE' This is the name of this constructible type that will be used by the factory to identify this class .. py:attribute:: _instance_name .. py:attribute:: _module_class_map .. py:method:: init(model_config: caikit.runtime.client.remote_config.RemoteModuleConfig, **kwargs) -> Optional[caikit.core.modules.ModuleBase] Given a RemoteModuleConfig, initialize a RemoteModule instance .. py:method:: construct_module_class(model_config: caikit.runtime.client.remote_config.RemoteModuleConfig) -> Type[caikit.core.modules.ModuleBase] Helper function to construct a ModuleClass. This is a separate function to allow for easy overloading Args: model_config: RemoteModuleConfig The model config to construct the module from Returns: module: Type[ModuleBase] The constructed module