from pydantic import BaseModel, ConfigDict, Field


class AMPConfig(BaseModel):
    model_config: ConfigDict = ConfigDict(frozen=True, strict=True, validate_assignment=True, extra='forbid')
    use_fp16: bool = Field(default=False)
    use_autocast: bool = Field(default=False)
    use_gard_scaler: bool = Field(default=False)
