SBU-BMI / wsinfer

🔥 🚀 Blazingly fast pipeline for patch-based classification in whole slide images
https://wsinfer.readthedocs.io
Apache License 2.0
55 stars 9 forks source link

clone batch_coords tensor to prevent Too many open files error #182

Closed kaczmarj closed 11 months ago

kaczmarj commented 11 months ago

When running wsinfer in a windows subsystem for linux environment, i got the error below. Appending a tensor from the dataloader to a list can cause this issue, and cloning the tensor solves it. This commit clones the tensor.

RuntimeError: Too many open files. Communication with the workers is no longer possible. Please increase the limit using `ulimit -n` in the shell or change the sharing strategy by calling `torch.multiprocessing.set_sharing_strategy('file_system')` at the beginning of your code

related to https://github.com/pytorch/pytorch/issues/11201