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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileExistsError when using on_disk_cache and multiple workers #1186

Open
knoriy opened this issue Jun 16, 2023 · 1 comment
Open

FileExistsError when using on_disk_cache and multiple workers #1186

knoriy opened this issue Jun 16, 2023 · 1 comment

Comments

@knoriy
Copy link
Contributor

knoriy commented Jun 16, 2023

馃悰 Describe the bug

When multiple workers try to create a folder structure at the same time it fails and raises FileExistsError.

Expected behavior: create folder structure and continue

torchdata.datapipes.iter.IterableWrapper(urls)\
        .on_disk_cache(filepath_fn=filepath_fn)\
        .open_files_by_fsspec(mode='rb')\
        .end_caching(filepath_fn=filepath_fn)
        
dl = DataLoader(datapipe, batch_size=16, num_workers=96, persistent_workers=True)

Versions

torchdata==0.6.1

@knoriy
Copy link
Contributor Author

knoriy commented Jun 16, 2023

I've opened a pull request which fixes this issue

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

No branches or pull requests

1 participant