Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .kokoro/github/ubuntu/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ "${KERAS2:-0}" == "1" ]
then
echo "Keras2 detected."
pip install -r requirements-common.txt --progress-bar off
pip install tensorflow-text==2.14 tensorflow==2.14 keras-core
pip install tensorflow-text==2.15 tensorflow[and-cuda]~=2.15 keras-core

elif [ "$KERAS_BACKEND" == "tensorflow" ]
then
Expand Down
5 changes: 5 additions & 0 deletions .kokoro/github/ubuntu/gpu/keras2/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ action {
}
}

env_vars: {
key: "KERAS2"
value: "1"
}

# Set timeout to 60 mins from default 180 mins
timeout_mins: 60
2 changes: 1 addition & 1 deletion keras_nlp/models/whisper/whisper_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def _load_dict(dict_or_path):
if isinstance(dict_or_path, str):
with open(dict_or_path, "r") as f:
with open(dict_or_path, "r", encoding="utf-8") as f:
dict_or_path = json.load(f)
return dict_or_path

Expand Down
2 changes: 1 addition & 1 deletion keras_nlp/tokenizers/byte_pair_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def __init__(
super().__init__(dtype=dtype, **kwargs)

if isinstance(vocabulary, str):
with open(vocabulary, "r") as f:
with open(vocabulary, "r", encoding="utf-8") as f:
self.vocabulary = json.load(f)
elif isinstance(vocabulary, dict):
self.vocabulary = vocabulary.copy()
Expand Down