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 Preprocessing Pickling Error #392

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mexicantexan
Copy link

@mexicantexan mexicantexan commented Nov 24, 2024

Not fully tested, but by moving the functions/classes causing the error outside of their respective functions into a broader scope the pickling error went away.

  • Move collate_fn function outside of dataset_to_dataloader function
  • Move ImageDataset class outside of get_image_dataset function

Should address:

With this change, was able to set the num_prepro_workers to > 0.

@mexicantexan
Copy link
Author

mexicantexan commented Nov 25, 2024

Tests are broken, doesn't seem like the tar files are getting extracted after they are created by img2dataset. I'm on a Windows machine using Python 3.10.

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

Successfully merging this pull request may close these issues.

1 participant