NASLib icon indicating copy to clipboard operation
NASLib copied to clipboard

This errors that occur when I validate the setup by running tests

Open SuperRui41 opened this issue 2 years ago • 1 comments

Hope to get help. Some errors that occur when I execute the command : coverage run -m unittest discover -v, The test result is “Ran 81 tests in 247.720s,FAILED (failures=6, errors=18)”

  1. Six of the same errors as the following
======================================================================
ERROR: test_get_config_from_args_default_bbo_bs (test_utils.UtilsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/marui/NAS/NASLib-Develop/tests/test_utils.py", line 38, in test_get_config_from_args_default_bbo_bs
    self._test_get_config_from_args_default(config_type="bbo-bs")
  File "/data/marui/NAS/NASLib-Develop/tests/test_utils.py", line 71, in _test_get_config_from_args_default
    config_child = utils.get_config_from_args(config_type=config_type)
  File "/data/marui/NAS/NASLib-Develop/naslib/utils/__init__.py", line 205, in get_config_from_args
    value) if arg in config else eval(value)
  File "<string>", line 1, in <module>
NameError: name 'v' is not defined
  1. Six of the AssertionErrors as the following
======================================================================
FAIL: test_forward_pass_aux_head (test_nb301_search_space.NasBench301SearchSpaceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/marui/NAS/NASLib-Develop/tests/test_nb301_search_space.py", line 120, in test_forward_pass_aux_head
    self.assertEqual(aux_out.shape, (3, 512, 8, 8))
AssertionError: torch.Size([3, 256, 8, 8]) != (3, 512, 8, 8)
  1. Twelve of the RuntimeErrors as the following
======================================================================
ERROR: test_feed_forward (test_hierarchical_search_space.HierarchicalDartsIntegrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/marui/NAS/NASLib-Develop/tests/test_hierarchical_search_space.py", line 50, in test_feed_forward
    logits = final_arch(data_train[0])
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data/marui/NAS/NASLib-Develop/naslib/search_spaces/core/graph.py", line 410, in forward
    edge_output = edge_data.op.forward(x, edge_data=edge_data)
  File "/data/marui/NAS/NASLib-Develop/naslib/search_spaces/core/primitives.py", line 388, in forward
    return self.seq(x)
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward
    input = module(input)
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 457, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/data/marui/anaconda3/envs/naslib/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [64, 64, 3, 3], expected input[2, 3, 32, 32] to have 64 channels, but got 3 channels instead

Are these errors normal ? Is there something wrong with my environment settings ? How should I resolve these errors ? Looking forward to everyone's response, thanks!

SuperRui41 avatar Mar 18 '23 09:03 SuperRui41

Hi @SuperRui41 ,

The tests in the main branch are currently old. Hence these errors are popping up. We are right now working to improve these tests. For now, I would recommend you ignore these errors till we work on a fix for this.

abhash-er avatar Jun 07 '23 15:06 abhash-er