-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Make multiprocessing import local to support pyodide #7519
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
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. |
Looking at this from the PyData NYC sprint. I don't really see how we could unblock this given that |
Where else is it being used? I guess that'd be the only way then, depends in how many modules we use it. |
Hi, I’d love to work on this issue as my first contribution. Is it still available? |
Yes! |
Hi @twiecki @ricardoV94, Updated PR #7736 to fix #7519 by moving Local tests failed ( Thanks, |
Hi @twiecki @ricardoV94, I’m 17 until June 30, missing GSoC 2025 registration (ends April 8). PR #7736 is in, and I fixed Thanks, |
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: