From 975cbd62f8d0d022bda979f1fb88f972aadb1a84 Mon Sep 17 00:00:00 2001 From: ndleslx Date: Mon, 24 Aug 2026 19:48:51 -0700 Subject: [PATCH] Fix: cap nanobind below 3.0 in the CI setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors pypto-lib#1018. nanobind 3.0.0 (released 2026-08-24) stopped binding a null holder to a parameter typed after a bound class; pypto's TileView uses one for start_offset, so ir.TileView() no longer matches its own all-defaulted overload and every pl.Tile annotation fails to parse — which is every model this repo's guards run. The cap has to live here: the build step passes --no-build-isolation, so the pypto extension compiles against the nanobind this action installs and pypto's own [build-system] requires is never consulted. Cap both pip installs (build step and serving-deps step). --- .github/actions/setup-ci-job/action.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-ci-job/action.yml b/.github/actions/setup-ci-job/action.yml index 08bdf3ac..369add5f 100644 --- a/.github/actions/setup-ci-job/action.yml +++ b/.github/actions/setup-ci-job/action.yml @@ -584,7 +584,15 @@ runs: # one transitive dependency sends pip backtracking through sixty # releases of scikit-build-core before reporting it, burying the real # message under a wall of version lists. - pip install 'scikit-build-core>=0.10' nanobind cmake ninja + # nanobind is capped below 3.0 to match pypto's own build requirement. + # It has to be pinned here rather than inherited: the pypto build below + # passes --no-build-isolation, so the extension is compiled against this + # install and pypto's [build-system] requires is never consulted. + # nanobind 3.0 stopped binding a null holder to a parameter typed after a + # bound class, which is what pypto's TileView uses for `start_offset`, so + # `ir.TileView()` no longer matches its own all-defaulted overload and + # every `pl.Tile` annotation fails to parse. + pip install 'scikit-build-core>=0.10' 'nanobind<3' cmake ninja # torch BEFORE pypto is built. pypto declares torch>=2.0.0, and if it is # not installed yet pip resolves that from the default index, where the # aarch64 wheel now drags ~1.5 GB of CUDA onto an Ascend host. Under @@ -658,7 +666,8 @@ runs: run: | source activate.sh # torch is installed in the build step above, before pypto is resolved. - pip install nanobind transformers safetensors numpy fastapi uvicorn pytest msgspec + # 'nanobind<3': same cap as the build step above. + pip install 'nanobind<3' transformers safetensors numpy fastapi uvicorn pytest msgspec # --no-deps: pyproject declares none, and the runtime stack above is # deliberately assembled by hand (CPU torch, from-source pypto). pip install --no-deps -e .