Skip to content

Required Arguments Bug Fix

Compare
Choose a tag to compare
@eladrich eladrich released this 06 Jan 06:32
· 42 commits to master since this release

Fixed a bug with nested dataclasses, where if the dataclass had a required argument the dataclass wrapper could not initialize the dataclass to define its default value and raised an exception.

@dataclass
class LogConfig:
    exp_dir: str

@dataclass
class TrainConfig:
    log: LogConfig= field(default_factory=LogConfig)