Skip to content

Fix test_split_batch pickling on Python 3.14 - #339

Open
nemanjaudovic wants to merge 1 commit into
ROCm:masterfrom
nemanjaudovic:fix-python314-split-batch-pickling
Open

Fix test_split_batch pickling on Python 3.14#339
nemanjaudovic wants to merge 1 commit into
ROCm:masterfrom
nemanjaudovic:fix-python314-split-batch-pickling

Conversation

@nemanjaudovic

Copy link
Copy Markdown

Description

Python 3.14 changed the default multiprocessing start method on Linux to forkserver. This requires DataLoader worker arguments to be picklable, but test_split_batch defines its dataset class inside the test method.

Move the dataset class to module scope so it can be pickled by workers while preserving the existing num_workers=2 coverage.

Testing

  • Run test_batch_sampler.TestBatchSamplerBehavior.test_split_batch with Python 3.14 and confirm it passes using the default forkserver start method.

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