caikit.runtime.model_management.loaded_model ============================================ .. py:module:: caikit.runtime.model_management.loaded_model .. autoapi-nested-parse:: A LoadedModel is a metadata wrapper around an instance of a core.ModuleBase class that contains the additional information needed to manage that model in the runtime. Attributes ---------- .. autoapisummary:: caikit.runtime.model_management.loaded_model.log caikit.runtime.model_management.loaded_model.error caikit.runtime.model_management.loaded_model.CaikitModelFuture caikit.runtime.model_management.loaded_model.CaikitModelFutureFactory Classes ------- .. autoapisummary:: caikit.runtime.model_management.loaded_model.LoadedModel Module Contents --------------- .. py:data:: log .. py:data:: error .. py:data:: CaikitModelFuture .. py:data:: CaikitModelFutureFactory .. py:class:: LoadedModel .. py:attribute:: __doc__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ A LoadedModel is a metadata wrapper around an instance of a core.ModuleBase class that contains the additional information needed to manage that model in the runtime. """ .. raw:: html
.. py:class:: Builder The LoadedModel.Builder allows the LoadedModel instance to be constructed in pieces with chained '.' getattr semantics. .. py:attribute:: _model_to_build .. py:method:: model_future_factory(caikit_model_future_factory: CaikitModelFutureFactory) -> LoadedModel .. py:method:: fail_callback(callback: Callable) -> LoadedModel .. py:method:: path(model_path: str) -> LoadedModel .. py:method:: type(model_type: str) -> LoadedModel .. py:method:: id(model_id: str) -> LoadedModel .. py:method:: retries(retries: int) -> LoadedModel .. py:method:: build() -> LoadedModel .. py:attribute:: _caikit_model_future_factory :type: Optional[CaikitModelFutureFactory] :value: None .. py:attribute:: _caikit_model_future :type: Optional[CaikitModelFuture] :value: None .. py:attribute:: _model :type: Optional[caikit.core.ModuleBase] :value: None .. py:attribute:: _fail_callback :type: Optional[Callable] :value: None .. py:attribute:: _model_id :type: str :value: '' .. py:attribute:: _model_path :type: str :value: '' .. py:attribute:: _model_type :type: str :value: '' .. py:attribute:: _retries :type: int :value: 0 .. py:attribute:: _size :type: Optional[int] :value: None .. py:method:: id() -> str .. py:method:: model() -> caikit.core.ModuleBase .. py:method:: loading() -> bool Return if a model load job has completed. The model job might have failed Returns: bool: If a local model job is still running .. py:method:: loaded() -> bool Return if a model load job has resulted in a local instance Returns: bool: If a local model instance is available .. py:method:: wait() .. py:method:: type() -> str .. py:method:: path() -> str .. py:method:: size() -> int .. py:method:: has_size() -> bool .. py:method:: set_size(model_size: int)