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

Multiprocessing with num_workers>1 fails with pickle errors #104

Closed
hagenw opened this issue Mar 25, 2024 · 7 comments
Closed

Multiprocessing with num_workers>1 fails with pickle errors #104

hagenw opened this issue Mar 25, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@hagenw
Copy link
Member

hagenw commented Mar 25, 2024

When running the tests in the current main we get:

$ python -m pytest -x
...
TypeError: cannot pickle 'mappingproxy' object

If I inspect the problem it uses multiprocessing=True and num_workers=5.
The error does not appear if I use multiprocessing=False or num_workers=1.

@frankenjoe seems like they changed something in Python?

@hagenw hagenw added the bug Something isn't working label Mar 25, 2024
@frankenjoe
Copy link
Collaborator

I guess though. Bu you have not upgraded the Python version, so why does the error suddenly appear?

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2024

That is a very good question. I repeated the test locally with Python 3.8 and it fails with the same error message. So I guess, it must be some interaction with another package.

@frankenjoe
Copy link
Collaborator

Maybe try to downgrade audinterface and/or audobject as a start?

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2024

Good point the error was introduced with audinterface 1.2.0.
But there weren't that much changes to it: https://audeering.github.io/audinterface/changelog.html#version-1-2-0-2024-03-21

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2024

The problem was that there were no tests for multiprocessing=True inside audinterface, so we didn't encounter the error there.

@hagenw
Copy link
Member Author

hagenw commented Mar 25, 2024

Turns out multiprocessing=True was also broken for earlier versions of audinterface (just the error message was differrent), compare audeering/audinterface#163

@hagenw
Copy link
Member Author

hagenw commented Mar 28, 2024

This is fixed with release 1.2.1 of audinterface

@hagenw hagenw closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants