From cdddb7c013645e70bacc4990e0cfd90178e9ed57 Mon Sep 17 00:00:00 2001 From: Matt Watson Date: Tue, 24 Oct 2023 13:31:05 -0700 Subject: [PATCH] test --- .github/workflows/actions.yml | 8 ++++---- keras_nlp/backend/config.py | 2 +- requirements-common.txt | 3 --- requirements-jax-cuda.txt | 5 ++--- requirements-tensorflow-cuda.txt | 4 ++-- requirements-torch-cuda.txt | 4 ++-- requirements.txt | 4 ++-- 7 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 9a35b0b8ec..6c5ce33769 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -7,7 +7,7 @@ on: types: [created] jobs: build: - name: Test the code with tf.keras + name: Test the code with Keras 2 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -29,7 +29,8 @@ jobs: ${{ runner.os }}-pip- - name: Install dependencies run: | - pip install -r requirements.txt --progress-bar off + pip install -r requirements-common.txt --progress-bar off + pip install tensorflow keras-core pip install --no-deps -e "." --progress-bar off - name: Test with pytest run: | @@ -38,7 +39,7 @@ jobs: run: | python pip_build.py --install && cd integration_tests && pytest . multibackend: - name: Test the code with Keras Core + name: Test the code with Keras 3 strategy: fail-fast: false matrix: @@ -65,7 +66,6 @@ jobs: - name: Install dependencies run: | pip install -r requirements.txt --progress-bar off - pip install keras-nightly -U --progress-bar off pip install --no-deps -e "." --progress-bar off - name: Test with pytest env: diff --git a/keras_nlp/backend/config.py b/keras_nlp/backend/config.py index 9b85907d00..7436012d1c 100644 --- a/keras_nlp/backend/config.py +++ b/keras_nlp/backend/config.py @@ -66,7 +66,7 @@ _MULTI_BACKEND = True # If keras is version 3, use multi-backend keras (our only option). -_IS_KERAS_3 = version.parse(keras.__version__) >= version.parse("3.0.0") +_IS_KERAS_3 = version.parse(keras.__version__) >= version.parse("3.0.0.dev0") if _IS_KERAS_3: _MULTI_BACKEND = True diff --git a/requirements-common.txt b/requirements-common.txt index 44661e315a..5c9710de4b 100644 --- a/requirements-common.txt +++ b/requirements-common.txt @@ -1,5 +1,4 @@ # Library deps. -keras-core>=0.1.6 dm-tree regex rich @@ -17,5 +16,3 @@ namex rouge-score sentencepiece tensorflow-datasets -# Breakage fix. -ml-dtypes==0.2.0 diff --git a/requirements-jax-cuda.txt b/requirements-jax-cuda.txt index 54c4b4b58c..6e3e9abc13 100644 --- a/requirements-jax-cuda.txt +++ b/requirements-jax-cuda.txt @@ -1,7 +1,6 @@ # Tensorflow cpu-only version. -tf-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. -tensorflow-text-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. -tensorflow-text>=2.14.0 +tf-nightly==2.16.0.dev202310024 # Pin a working nightly until rc0. +tensorflow-text-nightly==2.16.0.dev202310024 # Pin a working nightly until rc0. # Torch cpu-only version. --extra-index-url https://download.pytorch.org/whl/cpu diff --git a/requirements-tensorflow-cuda.txt b/requirements-tensorflow-cuda.txt index 4390590484..d2cda7821f 100644 --- a/requirements-tensorflow-cuda.txt +++ b/requirements-tensorflow-cuda.txt @@ -1,7 +1,7 @@ # Tensorflow with cuda support. --extra-index-url https://pypi.nvidia.com -tf-nightly[and-cuda]==2.15.0.dev20231009 # Pin a working nightly until rc0. -tensorflow-text-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. +tf-nightly[and-cuda]==2.16.0.dev20231024 # Pin a working nightly until rc0. +tensorflow-text-nightly==2.16.0.dev20231024 # Pin a working nightly until rc0. # Torch cpu-only version. --extra-index-url https://download.pytorch.org/whl/cpu diff --git a/requirements-torch-cuda.txt b/requirements-torch-cuda.txt index 3ab18fd24b..9382b22054 100644 --- a/requirements-torch-cuda.txt +++ b/requirements-torch-cuda.txt @@ -1,6 +1,6 @@ # Tensorflow cpu-only version. -tf-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. -tensorflow-text-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. +tf-nightly==2.16.0.dev20231024 # Pin a working nightly until rc0. +tensorflow-text-nightly==2.16.0.dev20231024 # Pin a working nightly until rc0. # Torch with cuda support. --extra-index-url https://download.pytorch.org/whl/cu118 diff --git a/requirements.txt b/requirements.txt index fa502ba37a..ac45fba345 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # Tensorflow. -tf-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. -tensorflow-text-nightly==2.15.0.dev20231009 # Pin a working nightly until rc0. +tf-nightly==2.16.0.dev20231024 # Pin a working nightly until rc0. +tensorflow-text-nightly==2.16.0.dev20231024 # Pin a working nightly until rc0. # Torch. --extra-index-url https://download.pytorch.org/whl/cpu