Skip to content

Commit 3c7597a

Browse files
jeffcarpjshin1394
andauthored
Replace keras_nlp references with keras_hub (#97)
* Replace keras_nlp with keras_hub keras_nlp was renamed to keras_hub (they're the same package): https://github.com/keras-team/keras-nlp * Update requirements.txt --------- Co-authored-by: Jiwon Shin <jshin1394@gmail.com>
1 parent 63aa0eb commit 3c7597a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ clu
33
jax[cpu]
44
jax_tpu_embedding
55
keras-hub
6-
keras-nlp
76
keras-rs
87
pytest
98
rouge-score
109
scikit-learn
11-
tensorflow
10+
tensorflow

src/metrax/nlp_metrics_test.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from absl.testing import parameterized
2222
import jax.numpy as jnp
2323
import keras_hub
24-
import keras_nlp
2524
import metrax
2625
import numpy as np
2726

@@ -64,7 +63,7 @@ def test_bleu(self):
6463
"He He He eats sweet apple which is a fruit",
6564
"I love Silicon Valley it is one of my favourite shows",
6665
]
67-
keras_metric = keras_nlp.metrics.Bleu()
66+
keras_metric = keras_hub.metrics.Bleu()
6867
keras_metric.update_state(references, predictions)
6968
metrax_metric = metrax.BLEU.from_model_output(predictions, references)
7069

@@ -88,7 +87,7 @@ def test_bleu_merge(self):
8887
"He He He eats sweet apple which is a fruit",
8988
"I love Silicon Valley it is one of my favourite shows",
9089
]
91-
keras_metric = keras_nlp.metrics.Bleu()
90+
keras_metric = keras_hub.metrics.Bleu()
9291
keras_metric.update_state(references, predictions)
9392
metrax_metric = None
9493
for ref_list, pred in zip(references, predictions):
@@ -127,12 +126,12 @@ def test_bleu_merge_fails_on_different_max_order(self):
127126
(
128127
"rougeL",
129128
metrax.RougeL,
130-
keras_nlp.metrics.RougeL,
129+
keras_hub.metrics.RougeL,
131130
),
132131
(
133132
"rougeN",
134133
metrax.RougeN,
135-
keras_nlp.metrics.RougeN,
134+
keras_hub.metrics.RougeN,
136135
),
137136
)
138137
def test_rouge(self, metrax_rouge, keras_rouge):
@@ -161,12 +160,12 @@ def test_rouge(self, metrax_rouge, keras_rouge):
161160
(
162161
"rougeL",
163162
metrax.RougeL,
164-
keras_nlp.metrics.RougeL,
163+
keras_hub.metrics.RougeL,
165164
),
166165
(
167166
"rougeN",
168167
metrax.RougeN,
169-
keras_nlp.metrics.RougeN,
168+
keras_hub.metrics.RougeN,
170169
),
171170
)
172171
def test_rouge_merge(self, metrax_rouge, keras_rouge):

0 commit comments

Comments
 (0)