From 5501d651c1044854f0ca083258be0a10a831fe54 Mon Sep 17 00:00:00 2001 From: arxyzan Date: Sun, 20 Aug 2023 20:09:14 +0330 Subject: [PATCH] Minor changes in config --- hezar/configs.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/hezar/configs.py b/hezar/configs.py index 1bb18793..36b4276c 100644 --- a/hezar/configs.py +++ b/hezar/configs.py @@ -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"] @@ -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())