From 6fd50a4094ce5474dd892080d365bc3f91e471b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigbj=C3=B8rn=20Skj=C3=A6ret?= Date: Sun, 27 Sep 2026 13:43:08 +0200 Subject: [PATCH] ci : bump ty to 0.0.84 (#29529) * bump ty to 0.0.84 * fix assertion bug caught by ty --- .github/workflows/python-type-check.yml | 2 +- conversion/bert.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-type-check.yml b/.github/workflows/python-type-check.yml index f3695be96f..7a2b65890f 100644 --- a/.github/workflows/python-type-check.yml +++ b/.github/workflows/python-type-check.yml @@ -31,7 +31,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.11" - pip-install: -r requirements/requirements-all.txt ty==0.0.78 + pip-install: -r requirements/requirements-all.txt ty==0.0.84 # - name: Type-check with Pyright # uses: jakebailey/pyright-action@v2 # with: diff --git a/conversion/bert.py b/conversion/bert.py index 8ea6c42dc6..23d8b93332 100644 --- a/conversion/bert.py +++ b/conversion/bert.py @@ -341,7 +341,7 @@ class NomicBertModel(BertModel): else: raise ValueError(f"unrecognized parameters: n_positions={npos}, max_trained_positions={mtp}") - assert self.hparams["activation_function"] == "gelu" if self.is_moe else "swiglu" + assert self.hparams["activation_function"] == ("gelu" if self.is_moe else "swiglu") # this doesn't do anything in the HF version assert self.hparams["causal"] is False