caikit.runtime.model_management.model_sizer_base
Attributes
Classes
Model Sizer Base class. This class contains the |
Module Contents
- class caikit.runtime.model_management.model_sizer_base.ModelSizerBase(config: aconfig.Config, instance_name: str)[source]
Bases:
caikit.core.toolkit.factory.FactoryConstructibleModel Sizer Base class. This class contains the
- abstract get_model_size(model_id: str, local_model_path: str, model_type: str) int[source]
Returns the estimated memory footprint of a model Args:
model_id: The model identifier, used for informative logging cos_model_path: The path to the model archive in S3 storage model_type: The type of model, used to adjust the memory estimate
- Returns:
The estimated size in bytes of memory that would be used by loading this model