Using pydrive with user credentials for authenticated download#3
Open
jeremyfix wants to merge 2 commits intoNVlabs:masterfrom
Open
Using pydrive with user credentials for authenticated download#3jeremyfix wants to merge 2 commits intoNVlabs:masterfrom
jeremyfix wants to merge 2 commits intoNVlabs:masterfrom
Conversation
Author
|
Note that, for some reasons, after some times (like hours), it may try to reauthenticate and it ends as a failure but relaunching the script and it continues downloading; I successfully downloaded the 90 GB of the 1024x1024 images this way. |
This was referenced Jul 27, 2022
neeek2303
approved these changes
Jul 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Unfortunately, when using your code, an anonymous download is performed and I tried several consecutive days, I always got an exceeded quota error making me unable to download the dataset.
This pull requests, which uses code adapted from the FFHQ-Aging repo is using user credentials for downloading the dataset.
The only requirement is to follow the pydrive quickstart for getting the
client_secrets.jsonfile placed in the same directory thandownload_ffhq.pyand you can then indicate you want to use pydrive google authentication by appending the--pydrivecommand line option.So for example, for downloading the 1024x1024 images, you simply :
In the code, several attempts are tried to download a file. Without that code, inspired by yours, I got some
httplib2.error.ServerNotFoundError: Unable to find the server at www.googleapis.combeing raised. Apparently, retrying the download a second time and the exception is not raised.I only tested the download of the images (the command line above) but as the other downloads go through the
download_filesfunction, I hope it works as well for the other downloads.