Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw committed Oct 25, 2023
1 parent 62f793c commit cdddb7c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion keras_nlp/backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions requirements-common.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Library deps.
keras-core>=0.1.6
dm-tree
regex
rich
Expand All @@ -17,5 +16,3 @@ namex
rouge-score
sentencepiece
tensorflow-datasets
# Breakage fix.
ml-dtypes==0.2.0
5 changes: 2 additions & 3 deletions requirements-jax-cuda.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements-tensorflow-cuda.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements-torch-cuda.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit cdddb7c

Please sign in to comment.