Skip to content

Commit e56657c

Browse files
authored
Fix l2l.utils.flatten_config.
1 parent 2cdfeed commit e56657c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

learn2learn/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ def flatten_config(args, prefix=None):
337337
return flat_args
338338
elif dataclasses.is_dataclass(args):
339339
keys = dataclasses.fields(args)
340-
def getvalue(x): getattr(args, x.name)
340+
def getvalue(x): return getattr(args, x.name)
341341
elif isinstance(args, dict):
342342
keys = args.keys()
343-
def getvalue(x): args[x]
343+
def getvalue(x): return args[x]
344344
else:
345345
raise 'Unknown args'
346346
for key in keys:

0 commit comments

Comments
 (0)