API Reference¶
Top-level exports¶
CNN blocks (creyone_model.cnn)¶
Utilities (creyone_model.utils)¶
- creyone_model.utils.config.type_subclass(cls, classinfo)[source]¶
Call issubclass safely, returning False if cls is not a type (e.g. MISSING).
- Parameters:
cls (type)
- Return type:
bool
- class creyone_model.utils.config.BaseCfg[source]¶
Bases:
objectBase class for hierarchical configuration dataclasses.
Subclasses should be decorated with
@dataclassand may declare fields of primitive types or otherBaseCfgsubclasses. Fields whosedefault_factoryis aBaseCfgsubclass are built recursively byinstance().- classmethod instance(**kwargs)[source]¶
Build an instance from kwargs and return any unconsumed kwargs.
Iterates over all dataclass fields, popping matching keys from kwargs. For fields whose
default_factoryis aBaseCfgsubclass, the method recurses, passing both the field-specific kwargs and all remaining kwargs so that shared parameters propagate down. Each nested call returns its own unconsumed kwargs, which continue up the chain.- Parameters:
**kwargs – Keyword arguments keyed by field name. Values for nested
BaseCfgfields should be provided as adictof sub-kwargs for that config.- Returns:
A
(instance, remaining_kwargs)tuple whereremaining_kwargsholds any kwargs not consumed by this class or its nested configs.- Return type:
tuple[Any, dict[str, Any]]
- __init__()¶
- Return type:
None