From d558f510c8eda3e2b6dfbfb3901ccf2ddc3ca4f8 Mon Sep 17 00:00:00 2001 From: Ryan Mullins Date: Wed, 6 Dec 2023 11:27:33 -0800 Subject: [PATCH] Add Python 3.11 to CI matrix. PiperOrigin-RevId: 588491335 --- .github/workflows/ci.yml | 2 +- lit_nlp/examples/models/tfx_model_test.py | 3 ++- pyproject.toml | 9 +++++---- requirements_examples.txt | 8 ++++---- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3046befe..236359e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: node-version: [18] - python-version: ["3.10"] + python-version: ["3.10", "3.11"] defaults: run: shell: bash -l {0} diff --git a/lit_nlp/examples/models/tfx_model_test.py b/lit_nlp/examples/models/tfx_model_test.py index 4b44b2d4..e7b977c9 100644 --- a/lit_nlp/examples/models/tfx_model_test.py +++ b/lit_nlp/examples/models/tfx_model_test.py @@ -12,7 +12,8 @@ def setUp(self): super(TfxModelTest, self).setUp() self._path = tempfile.mkdtemp() input_layer = tf.keras.layers.Input( - shape=(1), dtype=tf.string, name='example') + shape=(1,), dtype=tf.string, name='example' + ) parsed_input = tf.io.parse_example( tf.reshape(input_layer, [-1]), {'input_0': tf.io.FixedLenFeature([1], dtype=tf.float32)}) diff --git a/pyproject.toml b/pyproject.toml index fb3dea3f..5bed29b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,10 +79,11 @@ keywords = [ [project.optional-dependencies] # LINT.IfChange examples = [ - "gunicorn==20.1.0", - "tensorflow==2.10.0", - "tensorflow-datasets==4.8.0", - "tensorflow-text==2.10.0", + "gunicorn>=20.1.0", + "sentencepiece==0.1.99", + "tensorflow>=2.10.0,<2.16.0", + "tensorflow-datasets>=4.9.0", + "tensorflow-text>=2.10.0,<2.16.0", "torch>=2.0.0", "transformers>=4.27.1", ] diff --git a/requirements_examples.txt b/requirements_examples.txt index 7778c6d7..3015bfcb 100644 --- a/requirements_examples.txt +++ b/requirements_examples.txt @@ -13,11 +13,11 @@ # limitations under the License. # ============================================================================== # LINT.IfChange -gunicorn==20.1.0 +gunicorn>=20.1.0 sentencepiece==0.1.99 -tensorflow==2.10.0 -tensorflow-datasets==4.8.0 -tensorflow-text==2.10.0 +tensorflow>=2.10.0,<2.16.0 +tensorflow-datasets>=4.9.0 +tensorflow-text>=2.10.0,<2.16.0 torch>=2.0.0 transformers>=4.27.1 # LINT.ThenChange(./pyproject.toml)