Skip to content

Commit

Permalink
Add a test against keras-nightly (#1693)
Browse files Browse the repository at this point in the history
* Add a test against keras-nightly

* Remove invalid test
  • Loading branch information
mattdangerw authored Jul 16, 2024
1 parent 360da5b commit 3bb477a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
fail-fast: false
matrix:
backend: [tensorflow, jax, torch]
version: [latest]
version: [stable]
include:
- backend: torch
- backend: jax
version: 3.1
- backend: jax
version: nightly
runs-on: ubuntu-latest
env:
KERAS_BACKEND: ${{ matrix.backend }}
Expand All @@ -46,11 +48,16 @@ jobs:
run: |
pip install -r requirements.txt --progress-bar off
pip install --no-deps -e "." --progress-bar off
- name: Pin Keras version
- name: Pin Keras 3.1
if: ${{ matrix.version == '3.1'}}
run: |
pip uninstall -y keras
pip install keras==3.1.0 --progress-bar off
- name: Pin Keras Nightly
if: ${{ matrix.version == 'nightly'}}
run: |
pip uninstall -y keras
pip install keras-nightly --progress-bar off
- name: Test with pytest
run: |
pytest keras_nlp/
Expand Down
9 changes: 0 additions & 9 deletions keras_nlp/src/layers/modeling/transformer_decoder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,3 @@ def call(outputs, self_cache, cross_cache):
self.assertAllClose(output, no_loop_outputs)
self.assertAllClose(self_cache, no_loop_self_cache)
self.assertAllClose(cross_cache, no_loop_cross_cache)

def test_different_feature_dimension_for_encoder_and_decoder_sequence(self):
decoder = TransformerDecoder(
intermediate_dim=4,
num_heads=2,
)
decoder_sequence = random.uniform(shape=[1, 4, 6])
encoder_sequence = random.uniform(shape=[1, 4, 5])
decoder(decoder_sequence, encoder_sequence)

0 comments on commit 3bb477a

Please sign in to comment.