Skip to content
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

tqdm doesn't work on google colab #307

Closed
tl-yang opened this issue Nov 12, 2018 · 7 comments · Fixed by #343
Closed

tqdm doesn't work on google colab #307

tl-yang opened this issue Nov 12, 2018 · 7 comments · Fixed by #343
Assignees

Comments

@tl-yang
Copy link
Contributor

tl-yang commented Nov 12, 2018

Bug Description

As mentioned by @shyamalschandra.

According to tqdm issue#558
tqdm.notebook can't work on Google Colab due to the lack of ipywidgets

Reproducing Steps

Steps to reproduce the behavior:

  • Step 1: pip3 install autokeras on google colab
  • Step 2: run example/mnist.py by coping and pasting the code in Google Colab.

Expected Behavior

Should be working without error

Setup Details

Include the details about the versions of:

  • OS type and version: Google Colab
  • Python: 3.6
  • autokeras: 0.2.18
  • scikit-learn: 0.19.1
  • numpy: 1.14.5
  • keras: 2.2.2
  • scipy:
  • tensorflow: 1.10.0
  • pytorch: 0.4.1
  • tqdm: 4.25.0

Additional context

Could be solved by replacing

from tqdm.autonotebook import tqdm

to

from tqdm import tqdm

However, the final progress bar will remain on the terminal

@tl-yang tl-yang self-assigned this Nov 12, 2018
@chengs
Copy link

chengs commented Nov 13, 2018

Hi, I am a tqdm developer and am trying to address this problem.
I have a PR which has minimal function tqdm/tqdm#640
Could you please try it and give me some feedbacks? (eg. If it is enough for you).

@tl-yang
Copy link
Contributor Author

tl-yang commented Nov 13, 2018

Hi @chengs, thanks for the great work. With the patch, tqdm should be able to support tqdm.notebook on Google Colab, Is my understanding correct?
I've tried our original usage of tqdm:

from tqdm.autonotebook import tqdm
progress_bar = tqdm(total=len(
    desc='Epoch-'
    + str(self.current_epoch)
    + ', Current Metric - '
    + str(self.current_metric_value),
    file=sys.stdout,
    leave=False,
    ncols=100,
    position=0,
    unit=' batch')

Still I got the same error code.

@chengs
Copy link

chengs commented Nov 13, 2018

@tl-yang Yes, although it is hard to implement ALL the tqdm features since there is no ipywidgets support, my plan is to implement a ugly but workable progressbar without the support of ipywidgets.

I will check your case and try to make it work.

@tl-yang
Copy link
Contributor Author

tl-yang commented Nov 21, 2018

@chengs Do you have any update on this?

@chengs
Copy link

chengs commented Nov 21, 2018

I implement the basic function. Please see the demo here. https://colab.research.google.com/drive/12QXaI5ZAiQJfK-19HVl8fyjyh79B-TMf

The PR is waiting for review yet, so I think it may take weeks until my PR is merged into master.

haifeng-jin pushed a commit that referenced this issue Nov 26, 2018
* Change Process.Pool to subprocess to be compatible with google colab

* Add docstring for model_trainer and preprocessor

* Replace tqdm.notebook to tqdm for googcolab
@nyck33
Copy link

nyck33 commented Nov 4, 2019

Is it usable on Colab now? It seems to mess with it still.

@ktanay20
Copy link

@nyck33 For me it is still a mess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants