Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamanehSaadat committed Mar 14, 2024
1 parent d9eada8 commit 7b18970
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion keras_nlp/models/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def save_to_preset(
preset,
config_filename="tokenizer.json",
):
save_to_preset(self, preset, config_filename=config_filename)
save_to_preset(self.tokenizer, preset, config_filename=config_filename)

def __init_subclass__(cls, **kwargs):
# Use __init_subclass__ to setup a correct docstring for from_preset.
Expand Down
4 changes: 3 additions & 1 deletion keras_nlp/utils/preset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import json
import os

from keras_nlp.api_export import keras_nlp_export
from keras_nlp.backend import config as backend_config
from keras_nlp.backend import keras

Expand Down Expand Up @@ -155,9 +156,10 @@ def save_to_preset(
metadata_file.write(json.dumps(metadata, indent=4))


@keras_nlp_export("keras_nlp.upload_preset")
def upload_preset(
preset,
uri,
preset,
):
if uri.startswith(KAGGLE_PREFIX):
kaggle_handle = uri.removeprefix(KAGGLE_PREFIX)
Expand Down

0 comments on commit 7b18970

Please sign in to comment.