-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Make multiprocessing import local to support pyodide #7519
Comments
I don't think it makes sense to go out of our way to make a standard python lib import optional. It's an anti-pattern to import things inside functions. |
I agree it's an anti-pattern, but I think it certainly makes sense here because with a pretty simple change we enable PyMC in the browser. So I think the added tech debt is worth it. We can also make it optional if we're running on pyodide. |
How does that look like? |
if 'pyodide' in sys.modules:...
…On Wed, Oct 2, 2024, 18:23 Ricardo Vieira ***@***.***> wrote:
We can also make it optional if we're running on pyodide.
How does that look like?
—
Reply to this email directly, view it on GitHub
<#7519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFETGC4KO56WKJ7IOHONKDZZPCQ3AVCNFSM6AAAAABPHH3TUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBYGMYDANZQGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
That's even uglier |
So what do we do? |
Local import or nothing. Should an issue be open with pyodide as well? |
OK, I don't mind which way. What issue would that be? |
Shouldn't pyodide support the python standard library? |
I don't think it's an oversight, they just haven't figured out multiprocessing yet. |
Description
We almost have PyMC working natively under pyodide. But upon import we get an error importing multiprocessing which isn't included in pyodide:
If we made that optional, it will work out of the box.
The text was updated successfully, but these errors were encountered: