caikit.runtime.model_management.mm_model_sizer

Attributes

log

Classes

ModelMeshModelSizer

ModelMeshModelSizer. This class estimates a models size based on

Module Contents

caikit.runtime.model_management.mm_model_sizer.log[source]
class caikit.runtime.model_management.mm_model_sizer.ModelMeshModelSizer(config: aconfig.Config, instance_name: str)[source]

Bases: caikit.runtime.model_management.directory_model_sizer.DirectoryModelSizer

ModelMeshModelSizer. This class estimates a models size based on the contents of the directory multiplied by a model specific constant

name = 'MODEL_MESH'

This is the name of this constructible type that will be used by the factory to identify this class

get_model_size(model_id, local_model_path, model_type) 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