-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Stream progress #2875
Stream progress #2875
Conversation
I don't understand the purpose of the isolated Lines 150 to 156 in 75f8b9c
Lines 119 to 125 in 75f8b9c
GetContentFile support a file object rather than string?)
|
I assume source here? https://github.com/gsuitedevs/PyDrive/blob/68cea204cdcd10bab9321580164c8f4961385a0f/pydrive/files.py#L202 - in which this is non-trivial (by far easiest to open a PR upstream) - let me know if you want me to. |
@casperdcl PyDrive guys are not very responsive, so I would create a PR and create GetContentFileObj in our code to use for now. |
|
|
||
@gdrive_retry | ||
def gdrive_download_file( | ||
self, file_id, to_file, progress_name, no_progress_bar | ||
): | ||
from dvc.progress import Tqdm | ||
|
||
gdrive_file = self.drive.CreateFile({"id": file_id}) | ||
with Tqdm( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should remove this completely for now... Right now, a user will see something like "0/10GB" for 10mins before suddenly the operation completes and the bar disappears. It's probably better if instead we say "Downloading...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@casperdcl Let's keep it as is, at least there are some notifications (binary, but still) 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but if I saw a "0/10GB" bar doing nothing for a minute I'd assume something was wrong and nothing was happening & kill the process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@casperdcl But what are our options at this point? I suppose:
- remove it (which will just leave an empty screen, which is worse)
- add some kind of temporary spinner to keep the user entertained
- dive into pydrive and hack a proper solution for us and submit it to pydrive
am I missing something? If not, which one do you suggest? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely option 2 (well, not a spinner, but just the word "Downloading...")
- remove it: agreed bad
- change to something else: technically correct
- properly fix: would take a while and better to do in other PR(s)
- leave as-is (0/10GB hanging): I think worse than (1) because I'd be more likely to incorrectly think the program was hanging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@casperdcl The word will be static? If so, it doesn't seem very different from the current approach. Maybe Downloading... (no progress available)
to explain? 🙂 Though, we've just merged gdrive support and haven't even documented it yet, so perhaps we are overthinking the importance of this at this particular moment and we probably could simply wait for that stuff to get properly fixed before publically announcing the support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shcheklein my 2cs - I would vote for spinner in these cases. And I think it's good to have them in our toolkit anyways - will give us more flexibility in terms of building UI. @casperdcl do you have a spinner/super-compact mode for TQDM ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah idk I still prefer a correct static word to a misleading and incorrect 0/10GB. Of course we could try to improve the static word but atm tqdm
doesn't support threaded spinners (i.e. a background thread updates the screen even though no calls to update
or __iter__
were performed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always happy to accept a PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys, we are overthinking this one, it will probably get fixed properly very soon, so any placeholder will do (even the previous one, we used to have it for gs for the longest time and didn't receive that much complains, so I'm not really worried about the current temp solution). I'm fine with the current static "Downloading" for now.
tqdm>=4.40.0
remote.gs
to useTqdm.wrapattr
remote.gdrive
remote.gdrive
to useTqdm.wrapattr
wrapattr
tqdm/tqdm#844 <- Add support for data streams (with known total size) tqdm/tqdm#84