-
Notifications
You must be signed in to change notification settings - Fork 160
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
Importing torch crashed when metacall is imported first. #460
Comments
@iripoll Thank you so much for your report. This is a limitation related to metacall that cannot run outside of metacall. This problem basically happens because once it's run outside metacall, it initializes two instances of python. The solution of this has been investigated and the proposal is to detect if it's being run under an existing runtime and then relink the loaders on the fly to the process instead of loading the loader with the libpython dependency. Here is the issue described in more detail: #231 The same problem happens here with NodeJS: #31 I have investigated this in python and it happens also due to openssl but in this case is due to different versions of crypto library which have a dependency to openssl. Our distributable mitigates the issue but it's not ideal, eventually we will solve this completely for all runtimes. We only need a bit of magic. I am gonna keep the issue open so we can have more reference and cases where this happens for the future. Meanwhile we also have an integration with Jupyter, anybody needs to run metacall on top of it: https://github.com/metacall/jupyter-kernel |
🐛 Bug Report
Importing torch crashed when metacall is imported first.
Expected Behavior
Load torch silently.
Current Behavior
ipython and juputer-notebook crashes when importing torch.
Steps to Reproduce
Versions:
Context (Environment)
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: