Skip to content

Notebooks ci timeout fix - #125

Open
Nimok15 wants to merge 10 commits into
ReaLLMASIC:mainfrom
Nimok15:fix/notebooks-ci-timeout
Open

Nimok15 wants to merge 10 commits into
ReaLLMASIC:mainfrom
Nimok15:fix/notebooks-ci-timeout

Conversation

@Nimok15

@Nimok15 Nimok15 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Under headless nbconvert, that capture makes nbclient wait out the full per-cell timeout after every widget cell even though the kernel is already idle, so each notebook took 10 min per widget cell instead of seconds. The workflow forced the gdstk backend for all notebooks, but most of them import Component/rectangle directly from gdsfactory, so a gdstk-backed nmos() handed to a gdsfactory container failed.
Each notebook gets its own matrix job with a 30-minute budget, with the runner's own timeout set below the job cap so a report is always produced. The backend is selected per leg: gdstk for GLayout_Cells and glayout_opamp, gdsfactory for the others. A slow cell is now reported by name instead of as an opaque crash.

carloscl03 added a commit to carloscl03/gLayout that referenced this pull request Sep 14, 2026
PR ReaLLMASIC#125 has the better diagnosis. The tutorials wrap generation in
`with widgets.Output():`, and under headless nbconvert that capture makes
nbclient wait out the full per-cell timeout even though the kernel is
already idle -- 10 min per widget cell against 11 s without it. That is a
far larger effect than anything measured here.

My own A/B was confounded: removing `display_component` removed the
multi-MB SVG *and* the widget-capture cell at the same time, so it could
not tell them apart. And stripping the displays changed what CI exercises
-- the drawing path stopped being covered at all -- where ReaLLMASIC#125 keeps the
displays and disables only the capture. Theirs is the better fix, and
`_strip_displays` inserted at the same line of run_tutorial_notebooks.py
that ReaLLMASIC#125 inserts into, so this also removes the conflict.

Kept, because ReaLLMASIC#125 does not have them and they are independent of which
diagnosis is right:

  - jupyter-client==8.9.1, plus a step that enforces it on cache hits.
    The cache key hashes setup.py and src/, not the workflow, so a pin
    written only in the install step is inert when the venv is restored.
    That is how 8.10.0 got in: a src change busted the key on 2026-08-28
    and the cold rebuild took the version published that morning.
  - --retries 1 for the crash/timeout class only. A failing cell is never
    retried, so a genuinely broken notebook still fails every try.
@AL-255

AL-255 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Looks clean. Can you add a description of the new GLAYOUT_CI flag or give it a better name? (like a name that self-describes the purpose of the flag; it seems to be related to PEX).

@Nimok15

Nimok15 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the name according to its purpose.

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.

2 participants