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

Use filelock library for file downloads #2166

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

Nayef211
Copy link
Contributor

Summary:
Followup to D44604474 and D45048667. The previous 2 solutions didn't work because neither iopath nor fcntl implement platform agnostic locks. Thus the changes in the internal diffs could not be landed on github.

Using filelock should resolve the issue as it implements a platform agnostic file lock mechanism. This solution is also used by PyTorch Core to implement locking (see code pointer).

Reviewed By: debowin

Differential Revision: D45234254

fbshipit-source-id: 2285f94b13e36685ec6a5c1c4d2cd74dee9e0431

Summary:
Followup to D44604474 and D45048667. The previous 2 solutions didn't work because neither `iopath` nor `fcntl` implement platform agnostic locks. Thus the changes in the internal diffs could not be landed on github.

Using [filelock](https://py-filelock.readthedocs.io/en/latest/index.html) should resolve the issue as it implements a platform agnostic file lock mechanism. This solution is also used by PyTorch Core to implement locking (see [code pointer](https://github.com/pytorch/pytorch/blob/bb830224e3e98732c8f26c1f179ff770f07fd543/torch/_inductor/codecache.py#L263-L268)).

Reviewed By: debowin

Differential Revision: D45234254

fbshipit-source-id: 2285f94b13e36685ec6a5c1c4d2cd74dee9e0431
@pytorch-bot
Copy link

pytorch-bot bot commented Apr 26, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/text/2166

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Pending

As of commit 9cc4408:

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@Nayef211 Nayef211 merged commit 6b0f158 into pytorch:main Apr 27, 2023
@Nayef211 Nayef211 deleted the cherry_pick/82f44d0 branch April 27, 2023 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants