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

Jupyterlab front-end crash when using keras progress bar during training #5399

Open
ReDeiPirati opened this Issue Sep 28, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@ReDeiPirati

ReDeiPirati commented Sep 28, 2018

Describe the bug
The Jupyterlab front-end crash when using keras progress bar during training (which is the default behavior). This seems a long-standing issue from Jupyter.

To Reproduce
Steps to reproduce the behavior:

  1. Get the latest stable release of jupyterlab
  2. Run a simple MNIST training (make sure that the training will take more than 15 minutes)

or you can reproduce the freeze with the code below (which is similar to the Keras logging utility) - thanks to @houqp.

from time import sleep
while True:
    for i in range(10000):
        print(f'b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\r10624/60000 [====>.........................] - ETA: 12s - loss: 12.7657 - acc: 0.2077"', end="")
        sleep(0.001)  # you will experience the same issue with 0.01 and 0.1 as well
    print("")

Coult it be related to \b handling...?

  1. After this, the Browser window will become unresponsive and the Task Manager will report a CPU utilization > 100%.

Expected behavior
Not freezing/crashing the front-end.

Desktop:

  • OS: tested on Windows 10, MacOS 10.13.6
  • Browser: tested on Chrome 69.0, Firefox 62.0.
  • JupyterLab: tested on 0.34.2, 0.33.8, 0.31.12.

Additional context

Running the same code as a script from the Workspace Terminal doesn't produce any issue.

From the Logs:

Future exception was never retrieved
future: <Future finished exception=WebSocketClosedError()>
Traceback (most recent call last):
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/websocket.py", line 874, in wrapper
    yield fut
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/websocket.py", line 876, in wrapper
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
Future exception was never retrieved
future: <Future finished exception=WebSocketClosedError()>
Traceback (most recent call last):
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/websocket.py", line 874, in wrapper
    yield fut
  File "/Users/pirate/Developer/labs-test/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
tornado.iostream.StreamClosedError: Stream is closed
@blink1073

This comment has been minimized.

Member

blink1073 commented Oct 4, 2018

Hi @ReDeiPirati, I suspect this will not be solved until we move to server-side rendering of the document, cf #5382.

@blink1073 blink1073 added the type:Bug label Oct 4, 2018

@blink1073 blink1073 added this to the Future milestone Oct 4, 2018

@NickCastello

This comment has been minimized.

NickCastello commented Nov 3, 2018

Having this problem too

@hainm

This comment has been minimized.

hainm commented Dec 1, 2018

nglview's user encountered the freezing issue in lab v0.34.12 too (arose/nglview#759)

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