Skip to content

Commit

Permalink
Minor changes in config
Browse files Browse the repository at this point in the history
  • Loading branch information
arxyzan committed Aug 20, 2023
1 parent b5a69f5 commit 5501d65
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions hezar/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@

logger = get_logger(__name__)

CONFIG_TYPES_MAPPING = {
"Config": ConfigType.BASE,
"ModelConfig": ConfigType.MODEL,
"PreprocessorConfig": ConfigType.PREPROCESSOR,
"TrainerConfig": ConfigType.TRAINER,
"DatasetConfig": ConfigType.DATASET,
"EmbeddingConfig": ConfigType.EMBEDDING,
"CriterionConfig": ConfigType.CRITERION,
"OptimizerConfig": ConfigType.OPTIMIZER,
"LRSchedulerConfig": ConfigType.LR_SCHEDULER,
"MetricConfig": ConfigType.METRIC,
}

CONFIG_CLASS_VARS = ["name", "config_type"]


Expand All @@ -73,7 +60,7 @@ def __getitem__(self, item):
try:
return self.dict()[item]
except KeyError:
raise AttributeError(f"`{self.__class__.__name__}` has no attribute `{item}`!")
raise AttributeError(f"`{self.__class__.__name__}` does not have the parameter `{item}`!")

def __len__(self):
return len(self.dict())
Expand Down

0 comments on commit 5501d65

Please sign in to comment.