Skip to content

Commit

Permalink
Remove Keras pin, fix tests (#1681)
Browse files Browse the repository at this point in the history
* Remove Keras pin, see what breaks

* Fix tests
  • Loading branch information
mattdangerw authored Jul 3, 2024
1 parent e4f09b2 commit 4884660
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions keras_nlp/src/models/deberta_v3/deberta_v3_backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def setUp(self):
}
self.input_data = {
"token_ids": ops.ones((2, 5), dtype="int32"),
"segment_ids": ops.zeros((2, 5), dtype="int32"),
"padding_mask": ops.ones((2, 5), dtype="int32"),
}

Expand All @@ -60,7 +59,6 @@ def test_smallest_preset(self):
preset="deberta_v3_extra_small_en",
input_data={
"token_ids": ops.array([[0, 581, 63773, 2]], dtype="int32"),
"segment_ids": ops.zeros((1, 4), dtype="int32"),
"padding_mask": ops.ones((1, 4), dtype="int32"),
},
expected_output_shape=(1, 4, 384),
Expand Down
2 changes: 0 additions & 2 deletions keras_nlp/src/models/distil_bert/distil_bert_backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def setUp(self):
}
self.input_data = {
"token_ids": ops.ones((2, 5), dtype="int32"),
"segment_ids": ops.zeros((2, 5), dtype="int32"),
"padding_mask": ops.ones((2, 5), dtype="int32"),
}

Expand All @@ -60,7 +59,6 @@ def test_smallest_preset(self):
preset="distil_bert_base_en_uncased",
input_data={
"token_ids": ops.array([[101, 1996, 4248, 102]], dtype="int32"),
"segment_ids": ops.zeros((1, 4), dtype="int32"),
"padding_mask": ops.ones((1, 4), dtype="int32"),
},
expected_output_shape=(1, 4, 768),
Expand Down
2 changes: 0 additions & 2 deletions keras_nlp/src/models/roberta/roberta_backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def setUp(self):
}
self.input_data = {
"token_ids": ops.ones((2, 5), dtype="int32"),
"segment_ids": ops.zeros((2, 5), dtype="int32"),
"padding_mask": ops.ones((2, 5), dtype="int32"),
}

Expand All @@ -58,7 +57,6 @@ def test_smallest_preset(self):
preset="roberta_base_en",
input_data={
"token_ids": ops.array([[0, 133, 2119, 2]], dtype="int32"),
"segment_ids": ops.zeros((1, 4), dtype="int32"),
"padding_mask": ops.ones((1, 4), dtype="int32"),
},
expected_output_shape=(1, 4, 768),
Expand Down
2 changes: 0 additions & 2 deletions keras_nlp/src/models/xlm_roberta/xlm_roberta_backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def setUp(self):
}
self.input_data = {
"token_ids": ops.ones((2, 5), dtype="int32"),
"segment_ids": ops.zeros((2, 5), dtype="int32"),
"padding_mask": ops.ones((2, 5), dtype="int32"),
}

Expand All @@ -60,7 +59,6 @@ def test_smallest_preset(self):
preset="xlm_roberta_base_multi",
input_data={
"token_ids": ops.array([[0, 581, 63773, 2]], dtype="int32"),
"segment_ids": ops.zeros((1, 4), dtype="int32"),
"padding_mask": ops.ones((1, 4), dtype="int32"),
},
expected_output_shape=(1, 4, 768),
Expand Down
1 change: 0 additions & 1 deletion requirements-jax-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
keras==3.3.3
# Tensorflow cpu-only version.
tensorflow-cpu~=2.16.1 # Pin to TF 2.16
tensorflow-text~=2.16.1
Expand Down
1 change: 0 additions & 1 deletion requirements-tensorflow-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
keras==3.3.3
# Tensorflow with cuda support.
tensorflow[and-cuda]~=2.16.1 # Pin to TF 2.16
tensorflow-text~=2.16.1
Expand Down
1 change: 0 additions & 1 deletion requirements-torch-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
keras==3.3.3
# Tensorflow cpu-only version.
tensorflow-cpu~=2.16.1 # Pin to TF 2.16
tensorflow-text~=2.16.1
Expand Down

0 comments on commit 4884660

Please sign in to comment.