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

KeyError: 'Non-existent config key: SOLVER.CLIP_GRADIENTS' when trying to create TableBank model #97

Closed
luanpo1234 opened this issue Nov 2, 2021 · 3 comments

Comments

@luanpo1234
Copy link

I am getting this error when declaring model = lp.Detectron2LayoutModel('lp://TableBank/faster_rcnn_R_101_FPN_3x/config') or any other TableBank or PrimaLayout model.

Traceback (most recent call last):
  File "tester.py", line 149, in <module>
    model = lp.Detectron2LayoutModel('lp://TableBank/faster_rcnn_R_101_FPN_3x/config')
  File "venv\lib\site-packages\layoutparser\models\detectron2\layoutmodel.py", line 101, in __init__
    cfg.merge_from_file(config_path)
  File "venv\lib\site-packages\detectron2\config\config.py", line 45, in merge_from_file
    self.merge_from_other_cfg(loaded_cfg)
  File "venv\lib\site-packages\fvcore\common\config.py", line 123, in merge_from_other_cfg
    return super().merge_from_other_cfg(cfg_other)
  File "venv\lib\site-packages\yacs\config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "venv\lib\site-packages\yacs\config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "venv\lib\site-packages\yacs\config.py", line 491, in _merge_a_into_b
    raise KeyError("Non-existent config key: {}".format(full_key))
KeyError: 'Non-existent config key: SOLVER.CLIP_GRADIENTS'

Can anyone help me there?

@lolipopshock
Copy link
Member

I guess you're using an earlier version of Detectron2 -- could you share the version number with me pip show detectron2?

@luanpo1234
Copy link
Author

Thank you for replying, it says Version: 0.1

@lolipopshock
Copy link
Member

Yeah I guess that's the cause -- please try to upgrade the version of Detectron2:

pip install "git+https://github.com/facebookresearch/[email protected]#egg=detectron2"

As for GPU machines, you'd like to check the official installation instruction -- https://detectron2.readthedocs.io/en/latest/tutorials/install.html

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