caikit.core.model_management.multi_model_initializer

The MultiModelInitializer configures a set of other model initializers that will be used in sequence to try loading models.

Configuration for MultiModelInitializer lives under the config as follows:

model_management:
initializers:
<initializer name>:

type: MULTI config:

# Sequence of other initializer names to use in priority order initializer_priority:

  • other_initializer1

  • other_initializer2

Attributes

log

error

Classes

MultiModelInitializer

A class can be constructed by a factory if its constructor takes exactly

Module Contents

caikit.core.model_management.multi_model_initializer.log[source]
caikit.core.model_management.multi_model_initializer.error
class caikit.core.model_management.multi_model_initializer.MultiModelInitializer(config: aconfig.Config, instance_name: str)[source]

Bases: 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.

__doc__ = Multiline-String
Show Value
"""
The MultiModelInitializer configures a set of other model initializers that will be used
in sequence to try loading models.

Configuration for MultiModelInitializer lives under the config as follows:

model_management:
    initializers:
        <initializer name>:
            type: MULTI
            config:
                # Sequence of other initializer names to use in priority order
                initializer_priority:
                    - other_initializer1
                    - other_initializer2
"""
name = 'MULTI'

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

_instance_name
_initializers
init(model_config: caikit.core.modules.ModuleConfig, **kwargs) caikit.core.modules.ModuleBase | None[source]

Iterate through the sequence of initializers and return the first one that succeeds