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

pybind11::handle::inc_ref() is being called while the GIL is either not held or invalid. #33

Open
AruShar opened this issue Sep 3, 2024 · 1 comment

Comments

@AruShar
Copy link

AruShar commented Sep 3, 2024

In KG embedding, Link Prediction task, while executing 'python evaluate_transe_transductive.py', pybind11 error is popping out,

------------- link_prediction --------------
effective triplets: 14 / 14
effective filter triplets: 43160 / 43160
pybind11::handle::inc_ref() is being called while the GIL is either not held or invalid. Please see https://pybind11.readthedocs.io/en/stable/advanced/misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.
If you are convinced there is no bug in your code, you can #define PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF to disable this check. In that case you have to ensure this #define is consistently used for all translation units linked into a given pybind11 extension, otherwise there will be ODR violations. The failing pybind11::handle::inc_ref() call was triggered on a numpy.dtypes.Float32DType object.
pybind11::handle::dec_ref() is being called while the GIL is either not held or invalid. Please see https://pybind11.readthedocs.io/en/stable/advanced/misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.
If you are convinced there is no bug in your code, you can #define PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF to disable this check. In that case you have to ensure this #define is consistently used for all translation units linked into a given pybind11 extension, otherwise there will be ODR violations. The failing pybind11::handle::dec_ref() call was triggered on a numpy.dtypes.Float32DType object.
terminate called after throwing an instance of 'std::runtime_error'
what(): pybind11::handle::dec_ref() PyGILState_Check() failure.
Aborted (core dumped)

@AruShar
Copy link
Author

AruShar commented Sep 5, 2024

Please help me to solve this error ASAP.

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

1 participant