Skip to content

Fix broken progress bar #524

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 1 commit into from
Jun 6, 2018
Merged

Fix broken progress bar #524

merged 1 commit into from
Jun 6, 2018

Conversation

kohr-h
Copy link
Contributor

@kohr-h kohr-h commented Jun 3, 2018

Some minor fixes to make the downloads look nicer:

  • Fix broken update calculation
  • Make progress bar use the neat unit_scale feature
    of tqdm
  • Use tqdm_notebook in an IPython environment not working, removed

@@ -45,15 +47,22 @@ def download_url(url, root, filename, md5):
if os.path.isfile(fpath) and check_integrity(fpath, md5):
print('Using downloaded and verified file: ' + fpath)
else:
pbar_ctor = tqdm_notebook if '__IPYTHON__' in locals() else tqdm

This comment was marked as off-topic.

This comment was marked as off-topic.

- Fix broken update calculation
- Make progress bar use the neat `unit_scale` feature
  of tqdm
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Jun 4, 2018

@kohr-h there is a way to distinguish whether in jupyter notebook or in a script file like this

@kohr-h
Copy link
Contributor Author

kohr-h commented Jun 4, 2018

Thanks @vfdev-5, good to know. But as I mentioned, the tqdm_notebook seems to be broken anyway -- I'm getting NameError: name 'IntProgress' is not defined. As it seems, the code hasn't been updated for IPython versions > 4.

The plain progress bar also works decently in notebooks I think.

@kohr-h kohr-h changed the title Fix broken progress bar and improve for IPython Fix broken progress bar Jun 4, 2018
@kohr-h
Copy link
Contributor Author

kohr-h commented Jun 4, 2018

See tqdm/tqdm#394

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fmassa fmassa merged commit 50b2f91 into pytorch:master Jun 6, 2018
@kohr-h kohr-h deleted the fix_progress_bar branch June 20, 2018 17:15
varunagrawal pushed a commit to varunagrawal/vision that referenced this pull request Jul 23, 2018
- Fix broken update calculation
- Make progress bar use the neat `unit_scale` feature
  of tqdm
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

Successfully merging this pull request may close these issues.

3 participants