jeffheaton / t81_558_deep_learning

T81-558: Keras - Applications of Deep Neural Networks @Washington University in St. Louis
https://sites.wustl.edu/jeffheaton/t81-558/
Other
5.72k stars 3.03k forks source link

Random AssertionErrors & Output stops working #162

Closed trueToastedCode closed 1 year ago

trueToastedCode commented 1 year ago

Describe the bug Followed the latest installation instructions and my notebooks keep getting assertion errors... usually combined with the notebook stops working (code executes but it won't output anything anymore). I've changed the Python version from 3.10 to 3.8 which helped a lot with the frequency but it did not fully solve the issue.

Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 702, in _handle_events
        self._handle_write()
      File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 976, in _handle_write
        self._write_buffer.advance(num_bytes)
      File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 182, in advance
        assert 0 < size <= self._size
    AssertionError
Exception in callback None()
handle: <Handle cancelled>
Traceback (most recent call last):
  File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/platform/asyncio.py", line 206, in _handle_events
    handler_func(fileobj, events)
  File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 702, in _handle_events
    self._handle_write()
  File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 976, in _handle_write
    self._write_buffer.advance(num_bytes)
  File "/Users/lennard/miniconda3/envs/tensorflow/lib/python3.8/site-packages/tornado/iostream.py", line 182, in advance
    assert 0 < size <= self._size
AssertionError

Which Notebook Contains this Issue https://github.com/jeffheaton/t81_558_deep_learning/blob/master/install/tensorflow-install-mac-metal-jan-2023.ipynb

jeffheaton commented 1 year ago

My apologies, but I do not have the bandwidth to assist with individual installation issues. If you've found a bug in a specific notebook I am glad to investigate and resolve.

trueToastedCode commented 1 year ago

My apologies, but I do not have the bandwidth to assist with individual installation issues. If you've found a bug in a specific notebook I am glad to investigate and resolve.

Alright thx for noticing, no problem. If anybody should encounter the same issue... found the issue as well in https://github.com/microsoft/vscode-jupyter/issues/12775 (although i did not use VSCode but the error seems to be identical) Like mentioned there, downgrading some of the packages solves the issue (for now) 👍

%pip install IPython==8.4.0 ipykernel==6.15.2 ipywidgets==7.7.2 \
jupyter==1.0.0 jupyter_client==7.3.5 jupyter_core==4.12.0 jupyter-console==6.5.1 jupyter_server==1.21.0 \
nbclient==0.6.7 nbformat==5.4.0 notebook==6.4.12 traitlets==5.4.0  qtconsole==5.3.1