From e62674c070dacf12f9fee23bf8658a833136057a Mon Sep 17 00:00:00 2001 From: Xin Yang <105740670+xyang16@users.noreply.github.com> Date: Tue, 14 May 2024 10:31:05 -0700 Subject: [PATCH] Updates on djl_converter (#3187) * Updates on djl_converter * Update --- .../tokenizers/src/main/python/djl_converter/arg_parser.py | 3 --- .../src/main/python/djl_converter/huggingface_models.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py b/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py index ebc97b9790b..37df510a4ee 100644 --- a/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py +++ b/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py @@ -53,9 +53,6 @@ def converter_args(): if args.output_dir is None: args.output_dir = "." - if not os.path.exists(args.output_dir): - raise ValueError(f"Invalid output directory: {args.output_dir}.") - return args diff --git a/extensions/tokenizers/src/main/python/djl_converter/huggingface_models.py b/extensions/tokenizers/src/main/python/djl_converter/huggingface_models.py index e856871d133..931aea5b6c2 100644 --- a/extensions/tokenizers/src/main/python/djl_converter/huggingface_models.py +++ b/extensions/tokenizers/src/main/python/djl_converter/huggingface_models.py @@ -32,6 +32,7 @@ "ForSequenceClassification": "text-classification", "ForMultipleChoice": "text-classification", "ForMaskedLM": "fill-mask", + "BertModel": "sentence-similarity", } SUPPORTED_TASKS = { "fill-mask": FillMaskConverter(),