quantumlib/Qualtran

Flaky notebook CI

Closed this issue · 2 comments

the notebook CI fails randomly and rerunning it can pass (e.g. https://github.com/quantumlib/Qualtran/actions/runs/10065831764/job/27826570560) ... the error message looks like either a deadline issue or a multiprocessing issue

[IPKernelApp] WARNING | Parent appears to have exited, shutting down.
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/runner/work/Qualtran/Qualtran/dev_tools/qualtran_dev_tools/notebook_execution.py", line 200, in __call__
    err = execute_and_export_notebook(paths)
  File "/home/runner/work/Qualtran/Qualtran/dev_tools/qualtran_dev_tools/notebook_execution.py", line 156, in execute_and_export_notebook
    asyncio.run(executor.async_start_new_kernel_client())
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/nbclient/client.py", line 566, in async_start_new_kernel_client
    await ensure_async(self.kc.wait_for_ready(timeout=self.startup_timeout))
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line [198](https://github.com/quantumlib/Qualtran/actions/runs/10065831764/job/27826570560#step:6:199), in ensure_async
    result = await obj
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/jupyter_client/client.py", line 203, in _async_wait_for_ready
    raise RuntimeError(msg)
RuntimeError: Kernel died before replying to kernel_info

Dupe: #911

closing as duplicate