Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcpm committed Nov 8, 2024
1 parent 43c777b commit 5286eb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sleap_nn/config/trainer_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def from_dict(cls, config_dict: Dict[Text, Any]) -> "TrainerJobConfig":
@classmethod
def from_json(cls, json_data: Text) -> "TrainingJobConfig":
"""Create TrainingJobConfig from JSON-formatted string
Arguments:
json_data: JSON-formatted string that specifies the configurations.
Expand Down Expand Up @@ -137,7 +137,7 @@ def load_json(cls, filename: Text) -> "TrainingJobConfig":
return cls.from_json(json_data)

@classmethod
def load_yaml(cls, filename:Text) -> "TrainingJobConfig":
def load_yaml(cls, filename: Text) -> "TrainingJobConfig":
"""Load a training job configuration from a yaml file.
Arguments:
Expand All @@ -155,7 +155,7 @@ def to_dict(self) -> DictConfig:
Returns:
The dictionary representation of the configuration.
"""
"""
return OmegaConf.structured(self)

def to_json(self) -> str:
Expand Down Expand Up @@ -194,6 +194,7 @@ def save_yaml(self, filename: Text):
with open(filename, "w") as f:
f.write(self.to_yaml())


@attrs.define
class DataLoaderConfig:
"""train and val DataLoaderConfig: (Note: Any parameters from Torch's DataLoader could be used.)
Expand Down

0 comments on commit 5286eb7

Please sign in to comment.