Skip to content

Commit

Permalink
change to alias optimizer to "opt"
Browse files Browse the repository at this point in the history
  • Loading branch information
benmalef committed Nov 20, 2024
1 parent 58b9375 commit 101fc30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GANDLF/utils/pydantic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Parameters(BaseModel):
loss_function: Union[str, Dict]
data_augmentation: dict # TODO: maybe is better to create a class
nested_training: dict # TODO: maybe is better to create a class
optimizer: Union[dict, str] = Field(..., validation_alias="opt")
optimizer: Union[dict, str] = Field(alias="opt")
patch_sampler: Union[dict, str]
patch_size: Union[List[int], int]
clip_mode: Union[str, None]
Expand All @@ -75,3 +75,7 @@ class Parameters(BaseModel):
output_dir: Optional[str] = ""
problem_type: Optional[str] = None
differential_privacy: Optional[dict] = {}

@property
def opt(self):
return self.optimizer

0 comments on commit 101fc30

Please sign in to comment.