class documentation

class Config(BaseModelExtraForbid):

View In Hierarchy

Configuration schema for an NN Archive.

Class Method validate_config_version_format Validate that the schema version uses major.minor format.
Method __repr__ Undocumented
Method __str__ Undocumented
Instance Variable config_version Schema version in major.minor format.
Instance Variable model Neural network configuration stored in the archive.
@field_validator('config_version')
@classmethod
def validate_config_version_format(cls, v: str) -> str:

Validate that the schema version uses major.minor format.

Examples

>>> Config.validate_config_version_format("1.0")
'1.0'
>>> Config.validate_config_version_format("1")
Traceback (most recent call last):
...
ValueError: 'config_version' must be in format 'x.y' where x and y are integers
Parameters
v:strSchema version string.
Returns
strThe validated schema version.
Raises
ValueErrorIf v is not in major.minor format, where both parts are integers.
def __repr__(self) -> str:

Undocumented

def __str__(self) -> str:

Undocumented

config_version: str =

Schema version in major.minor format.

model: Model =

Neural network configuration stored in the archive.