Skip to content
Permalink
Browse files

fix(base): fix dump yaml kwargs

  • Loading branch information...
hanxiao committed Jul 19, 2019
1 parent 7ab0fdb commit 1b52683216a4bea57a5b9ac37b5b9c98e3586b30
Showing with 2 additions and 2 deletions.
  1. +1 −1 gnes/base/__init__.py
  2. +1 −1 tests/test_yaml.py
@@ -127,7 +127,7 @@ def arg_wrapper(self, *args, **kwargs):
taboo = {'self', 'args', 'kwargs'}
taboo.update(TrainableType.default_gnes_config.keys())
all_pars = inspect.signature(func).parameters
tmp = {k: v.default for k, v in all_pars.items()}
tmp = {k: v.default for k, v in all_pars.items() if k not in taboo}
tmp_list = [k for k in all_pars.keys() if k not in taboo]
# set args by aligning tmp_list with arg values
for k, v in zip(tmp_list, args):
@@ -52,7 +52,7 @@ def tearDown(self):
if os.path.exists(self.dump_path):
os.remove(self.dump_path)

def test_siganature(self):
def test_signature(self):
a = foo1(2)
self.assertEqual(a._init_kwargs_dict, {'a': 2, 'b': 1})
a = foo2(2, 3, 3)

0 comments on commit 1b52683

Please sign in to comment.
You can’t perform that action at this time.