Skip to content

Config

config

T = TypeVar('T', bound=dataclass) module-attribute

ConfigWrapper

wrapped = wrapped instance-attribute

signature = inspect.signature(wrapped) instance-attribute

filter_keys = filter_keys instance-attribute

name = name instance-attribute

config = config instance-attribute

__init__(wrapped, config: Config, name: Optional[str] = None)

get_params(*args, **kwargs)

__call__(*args, **kwargs)

Config

Bases: MutableMapping

omconf = config if isinstance(config, OmegaConf) else OmegaConf.structured(config) if is_dataclass(config) else OmegaConf.create(config) instance-attribute

__new__(config: Union[Type[T], dict[str, Any]]) -> Union[T, Self]

__new__(config: Type[T]) -> T
__new__(config: dict[str, Any]) -> Self

__init__(config: Any) -> None

__getitem__(name: str) -> Any

__setitem__(name: str, value: Any) -> None

__delitem__(name: str) -> None

__iter__() -> Any

__len__() -> int

__getattr__(name: str) -> Any

wraps(wrapped: Union[type, callable, str, None] = None, **kwargs: Any) -> Union[ConfigWrapper, functools.partial]

wraps(wrapped: Union[type, callable], **kwargs) -> ConfigWrapper
wraps(wrapped: Union[str, None], **kwargs) -> functools.partial

load(path: str) -> Self classmethod

from_dotlist(dotlist: str) -> Self classmethod

from_cli(args: list[str]) -> Self classmethod

configmethod(func: T) -> T