Skip to content

fix: make sure pillow is not partially upgraded - #7

Open
AngeloDanducci wants to merge 2 commits into
generative-computing:mainfrom
AngeloDanducci:ad-1640
Open

AngeloDanducci wants to merge 2 commits into
generative-computing:mainfrom
AngeloDanducci:ad-1640

Conversation

@AngeloDanducci

Copy link
Copy Markdown
Contributor

@psschwei psschwei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't comment on the cell for some reason, but what about doing something like this (using the ICML notebook as an example)

!uv pip install --reinstall-package pillow "mellea[hf,docling,sandbox,tools]==0.6.0"

that keeps it all in one line and may help with future resolution too

@AngeloDanducci

Copy link
Copy Markdown
Contributor Author

@psschwei I don't think this was solvable via UV - hence the sys.executable call. However in doing some additional investigating around this I found the best way to fix this seems to be just restarting the kernel to pickup updates instead of dealing with a stale cached version (being served via the colab env instead of uv).

@psschwei

psschwei commented Sep 14, 2026

Copy link
Copy Markdown
Member

I tried to run the ICML notebook in collab and it crashed on me running the first cell a couple of times. Here's the logs:

Timestamp Level Message
Sep 14, 2026, 4:10:35 PM WARNING 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Sep 14, 2026, 4:10:35 PM WARNING 0.00s - to python to disable frozen modules.
Sep 14, 2026, 4:10:35 PM WARNING 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
Sep 14, 2026, 4:10:35 PM WARNING 0.00s - Debugger warning: It seems that frozen modules are being used, which may
Sep 14, 2026, 4:10:35 PM WARNING kernel b1508255-767f-4a9a-a920-98f4fa696ac7 restarted
Sep 14, 2026, 4:10:35 PM INFO AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
Sep 14, 2026, 4:09:54 PM WARNING 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Sep 14, 2026, 4:09:54 PM WARNING 0.00s - to python to disable frozen modules.
Sep 14, 2026, 4:09:54 PM WARNING 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
Sep 14, 2026, 4:09:54 PM WARNING 0.00s - Debugger warning: It seems that frozen modules are being used, which may
Sep 14, 2026, 4:09:53 PM WARNING kernel b1508255-767f-4a9a-a920-98f4fa696ac7 restarted
Sep 14, 2026, 4:09:53 PM INFO AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
Sep 14, 2026, 4:09:36 PM WARNING Setting websocket_ping_timeout=30000
Sep 14, 2026, 4:09:36 PM WARNING The websocket_ping_timeout (90000) cannot be longer than the websocket_ping_interval (30000).
Sep 14, 2026, 4:09:36 PM INFO Connecting to kernel b1508255-767f-4a9a-a920-98f4fa696ac7.
Sep 14, 2026, 4:09:35 PM WARNING 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Sep 14, 2026, 4:09:35 PM WARNING 0.00s - to python to disable frozen modules.
Sep 14, 2026, 4:09:35 PM WARNING 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
Sep 14, 2026, 4:09:35 PM WARNING 0.00s - Debugger warning: It seems that frozen modules are being used, which may
Sep 14, 2026, 4:09:35 PM INFO Kernel started: b1508255-767f-4a9a-a920-98f4fa696ac7
Sep 14, 2026, 4:09:34 PM WARNING 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Sep 14, 2026, 4:09:34 PM WARNING 0.00s - to python to disable frozen modules.
Sep 14, 2026, 4:09:34 PM WARNING 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
Sep 14, 2026, 4:09:34 PM WARNING 0.00s - Debugger warning: It seems that frozen modules are being used, which may
Sep 14, 2026, 4:07:21 PM INFO Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Sep 14, 2026, 4:07:21 PM INFO http://127\.0\.0\.1:9000/
Sep 14, 2026, 4:07:21 PM INFO http://172\.28\.0\.12:9000/
Sep 14, 2026, 4:07:21 PM INFO Jupyter Server 2.20.0 is running at:
Sep 14, 2026, 4:07:21 PM INFO Serving notebooks from local directory: /
Sep 14, 2026, 4:07:21 PM INFO panel.io.jupyter_server_extension
Sep 14, 2026, 4:07:21 PM INFO nbclassic
Sep 14, 2026, 4:07:21 PM INFO jupyterlab_jupytext
Sep 14, 2026, 4:07:21 PM INFO [Jupytext Server Extension] Deriving an AsyncTextFileContentsManager from AsyncLargeFileManager
Sep 14, 2026, 4:07:21 PM INFO jupyter_server_terminals
Sep 14, 2026, 4:07:21 PM INFO ipyparallel
Sep 14, 2026, 4:07:21 PM INFO Loading IPython parallel extension
Sep 14, 2026, 4:07:21 PM INFO google.colab._serverextension
Sep 14, 2026, 4:07:21 PM INFO google.colab server extension initialized on gpu-t4-s-kkb-ass1a0-26dekdxe5btrg.
Sep 14, 2026, 4:07:21 PM INFO google.colab
Sep 14, 2026, 4:07:21 PM INFO notebook_shim
Sep 14, 2026, 4:07:21 PM WARNING Customizing authentication via ServerApp.login_handler_class=<class 'google.colab._login_handler.ColabLoginHandler'> is deprecated in Jupyter Server 2.0. Use ServerApp.identity_provider_class. Falling back on legacy authentication.
Sep 14, 2026, 4:07:21 PM INFO panel.io.jupyter_server_extension
Sep 14, 2026, 4:07:21 PM INFO notebook_shim
Sep 14, 2026, 4:07:21 PM WARNING /root/.jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM WARNING /root/.local/etc/jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM WARNING /usr/etc/jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM WARNING /usr/local/etc/jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM WARNING /usr/local/etc/jupyter/jupyter_notebook_config.d/panel-client-jupyter.json
Sep 14, 2026, 4:07:21 PM WARNING /usr/local/etc/jupyter/jupyter_notebook_config.d/jupytext.json
Sep 14, 2026, 4:07:21 PM WARNING /usr/local/etc/jupyter/jupyter_notebook_config.d/ipyparallel.json
Sep 14, 2026, 4:07:21 PM WARNING /etc/jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM WARNING /root/.jupyter/jupyter_notebook_config.json
Sep 14, 2026, 4:07:21 PM INFO Writing Jupyter server cookie secret to /root/.local/share/jupyter/runtime/jupyter_cookie_secret
Sep 14, 2026, 4:07:21 PM INFO nbclassic
Sep 14, 2026, 4:07:21 PM INFO jupyterlab_jupytext
Sep 14, 2026, 4:07:21 PM INFO jupyter_server_terminals
Sep 14, 2026, 4:07:21 PM INFO ipyparallel
Sep 14, 2026, 4:07:21 PM INFO google.colab._serverextension
Sep 14, 2026, 4:07:21 PM INFO google.colab
Sep 14, 2026, 4:07:21 PM INFO Extension package panel.io.jupyter_server_extension took 2.8584s to import
Sep 14, 2026, 4:07:18 PM WARNING A \_jupyter\_server\_extension\_points function was not found in nbclassic. Instead, a \_jupyter\_server\_extension\_paths function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
Sep 14, 2026, 4:07:18 PM INFO Extension package jupyterlab_jupytext took 0.6040s to import
Sep 14, 2026, 4:07:17 PM WARNING A \_jupyter\_server\_extension\_points function was not found in ipyparallel. Instead, a \_jupyter\_server\_extension\_paths function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
Sep 14, 2026, 4:07:17 PM INFO Extension package ipyparallel took 0.2080s to import
Sep 14, 2026, 4:07:17 PM WARNING /root/.jupyter/jupyter_server_config.json
Sep 14, 2026, 4:07:17 PM WARNING /root/.local/etc/jupyter/jupyter_server_config.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/etc/jupyter/jupyter_server_config.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/panel-client-jupyter.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/notebook_shim.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/nbclassic.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/jupytext.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/jupyter_server_terminals.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/ipyparallel.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/google.colab.json
Sep 14, 2026, 4:07:17 PM WARNING /usr/local/etc/jupyter/jupyter_server_config.d/google.colab._serverextension.json
Sep 14, 2026, 4:07:17 PM WARNING /etc/jupyter/jupyter_server_config.json
Sep 14, 2026, 4:07:16 PM WARNING ServerApp.iopub_data_rate_limit config is deprecated in 2.0. Use ZMQChannelsWebsocketConnection.iopub_data_rate_limit.
Sep 14, 2026, 4:07:16 PM WARNING [W 2026-09-14 20:07:16.933 ServerApp] ServerApp.token config is deprecated in 2.0. Use IdentityProvider.token.
Sep 14, 2026, 4:07:16 PM WARNING warn(

I'm not really sure what to make of these errors tbh.

Also will tag in @jakelorocco and @nrfulton in case they have an alternative viewpoint on whether we should try to maintain these notebooks on collab...

@AngeloDanducci

AngeloDanducci commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Did you try running sequential cells after the "crash"? This IPython.Application.instance().kernel.do_shutdown(True) - which makes sure we don't have any cache fun, also pops up the little crash helper even though the cell ran fine. I assume it's detecting the kernel being down as a crash. Running the following cells works as expected.

May be a better way of doing it though.

Edit: assuming you also have the zstd fix in #6

@psschwei

Copy link
Copy Markdown
Member

I did not try running additional cells.

Is there any way to avoid or hide the warnings? Feels like that would be a better UX if possible

@AngeloDanducci

Copy link
Copy Markdown
Contributor Author

I did some digging and could not find a way to restart it without the warning or suppress it.

@jakelorocco

Copy link
Copy Markdown
Contributor

Also will tag in @jakelorocco and @nrfulton in case they have an alternative viewpoint on whether we should try to maintain these notebooks on collab...

Personally, I think the notebooks on collab are useful when doing demos / presentations. If the errors / difficulties are different between the notebooks, we should at least have a current that we try to maintain / minimize errors for.

@psschwei

Copy link
Copy Markdown
Member

we should at least have a current that we try to maintain / minimize errors for.

I like this idea

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.

Pin pillow to a version that includes '_Ink' in 'PIL._typing'

3 participants