File size: 296 Bytes
08c5e28
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from typing import Protocol, TypeVar

ModelType = TypeVar("ModelType")


class ModelConfigurator(Protocol[ModelType]):
    """Protocol for model loader classes that instantiates models from a configuration dictionary."""

    @classmethod
    def from_config(cls, config: dict) -> ModelType: ...