Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running inference using demo.py - <class 'functools.partial'> is not a valid type #5130

Open
Abdulmalik0x opened this issue Oct 24, 2023 · 3 comments

Comments

@Abdulmalik0x
Copy link

Abdulmalik0x commented Oct 24, 2023

Hey!

As described in the title, I'm facing an issue related to yacs library as it doesn't recognize the type function.partial inside
my config file which is generated by detectron2 platform.

Traceback (most recent call last):
  File "/raid/malik/github/EVA/EVA-01/det/./demo/demo.py", line 100, in <module>
    cfg = setup_cfg(args)
  File "/raid/malik/github/EVA/EVA-01/det/./demo/demo.py", line 29, in setup_cfg
    cfg.merge_from_file(args.config_file)
  File "/raid/malik/github/EVA/EVA-01/det/detectron2/config/config.py", line 47, in merge_from_file
    loaded_cfg = type(self)(loaded_cfg)
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 126, in _create_config_tree_from_dict
    dic[k] = cls(v, key_list=key_list + [k])
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 126, in _create_config_tree_from_dict
    dic[k] = cls(v, key_list=key_list + [k])
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 126, in _create_config_tree_from_dict
    dic[k] = cls(v, key_list=key_list + [k])
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 86, in __init__
    init_dict = self._create_config_tree_from_dict(init_dict, key_list)
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 129, in _create_config_tree_from_dict
    _assert_with_logging(
  File "/home/research/anaconda3/envs/eva/lib/python3.9/site-packages/yacs/config.py", line 545, in _assert_with_logging
    assert cond, msg
AssertionError: Key model.backbone.net.norm_layer with value <class 'functools.partial'> is not a valid type; valid types: {<class 'NoneType'>, <class 'int'>, <class 'float'>, <class 'str'>, <class 'list'>, <class 'tuple'>, <class 'bool'>}

Thanks,
Abdulmalik

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label Oct 24, 2023
@github-actions
Copy link

We found that not enough information is provided about this issue.
Please provide details following the issue template.

@Abdulmalik0x Abdulmalik0x changed the title Please read & provide the following Error when running inference using demo.py - <class 'functools.partial'> is not a valid type Oct 24, 2023
@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label Oct 24, 2023
@Abdulmalik0x
Copy link
Author

Can you support regarding this please!

@eliasm56
Copy link

eliasm56 commented Jun 9, 2024

Any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants