Skip to content

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

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
Contributor

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