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

8.x timeout bug #938

Closed
mlucool opened this issue Mar 20, 2023 · 2 comments
Closed

8.x timeout bug #938

mlucool opened this issue Mar 20, 2023 · 2 comments

Comments

@mlucool
Copy link
Contributor

mlucool commented Mar 20, 2023

When upgrading to 7.4.9 to 8.1.0, the timeout parameter no longer works with papermill + a custom KernelManager.

Example notebook, example_slow.ipynb:

from time import sleep
sleep(10)

Executing with papermill:

import papermill as pm
pm.execute_notebook("example_slow.ipynb", "example_slow.out.ipynb", timeout=1, kernel_manager_class="jupyter_client.manager.KernelManager")

With 7.4.9 this correctly raises CellTimeoutError. With 8.1.0 the notebook runs to completion (in 10 seconds). Oddly, if I don't use a custom manager class, it also errors correctly. I need a custom manager given #154 (comment).

Is this a bug in this package or should how timeout is used be changed in papermill?

@tuncbkose
Copy link

tuncbkose commented Apr 4, 2023

It seems to me that jupyter_client>=8 breaks some assumptions that nbclient made, so this is not necessarily a bug with jupyter_client.

Edit: How about using jupyter_client.manager.AsyncKernelManager?

@mlucool
Copy link
Contributor Author

mlucool commented Apr 17, 2023

This seems to work, and solves my use case. I'll close this, but I'm not sure if others feel there is still a bug here. If so, please reopen.

@mlucool mlucool closed this as completed Apr 17, 2023
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

No branches or pull requests

2 participants