@@ -28,11 +28,11 @@ class Config(UserDict):
28
28
"""Dict-like config class that can read from and write to yaml and json files and allows updating with other config objects."""
29
29
30
30
def __init__ (self , data : dict = None , name : str = DEFAULT ) -> None :
31
- # super class deliberately not called
31
+ # super class deliberately not called as this calls "update" (which we overwrite)
32
32
self .data = (
33
33
{** data } if data is not None else {}
34
34
) # this needs to be called 'data' as we inherit from UserDict
35
- self .experiment_name = name
35
+ self .name = name
36
36
37
37
def from_yaml (self , path : str ) -> None :
38
38
with open (path ) as f :
@@ -74,11 +74,6 @@ def update(self, configs: list["Config"], do_print: bool = False):
74
74
do_print : bool, optional
75
75
Whether to print the modified config. Default is False.
76
76
"""
77
- if isinstance (experiments , dict ):
78
- # need to resolve name clash with basic method unless we find a better name for 'our' update
79
- super ().update (experiments )
80
- return
81
-
82
77
# we assume that self.data holds the default config
83
78
default_config = deepcopy (self .data )
84
79
@@ -88,7 +83,6 @@ def _recursive_defaultdict():
88
83
89
84
tracking_dict = defaultdict (_recursive_defaultdict )
90
85
91
-
92
86
current_config = deepcopy (self .data )
93
87
for config in configs :
94
88
logger .info (f"Updating config with '{ config .name } '" )
0 commit comments