Skip to content

support confirming no virus scan on GDrive download #5645

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

Merged
merged 5 commits into from
Apr 1, 2022

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Mar 18, 2022

Fixes #5615.

@facebook-github-bot
Copy link

facebook-github-bot commented Mar 18, 2022

💊 CI failures summary and remediations

As of commit 4d0980d (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



🚧 2 ongoing upstream failures:

These were probably caused by upstream breakages that are not fixed yet.


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@@ -28,27 +28,24 @@
USER_AGENT = "pytorch/vision"


def _urlretrieve(url: str, filename: str, chunk_size: int = 1024) -> None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both this function and _save_response_content below had the same functionality, so I factored it out.

@@ -202,70 +208,41 @@ def download_file_from_google_drive(file_id: str, root: str, filename: Optional[
"""
# Based on https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can drop this comment at some point, because our implementation no longer resembles the answer in the link.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pmeier , stamping

@pmeier pmeier merged commit 96f2c0d into pytorch:main Apr 1, 2022
@pmeier pmeier deleted the gdrive-virus-scan branch April 1, 2022 17:30
facebook-github-bot pushed a commit that referenced this pull request Apr 6, 2022
Summary:
* support confirming no virus scan on GDrive download

* put gen_bar_updater back

* Update torchvision/datasets/utils.py

Reviewed By: NicolasHug

Differential Revision: D35393174

fbshipit-source-id: 6a0977169f46dad3156c9bd60f13cf4a7ace176b

Co-authored-by: Nicolas Hug <[email protected]>
Co-authored-by: Nicolas Hug <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants