From 6a581209b35b9e4967e35953429bd9d03a45a6ea Mon Sep 17 00:00:00 2001 From: Xin Yang Date: Wed, 23 Oct 2024 18:57:51 -0700 Subject: [PATCH] [djl-convert] Fix huggingface converter --- .../src/main/python/djl_converter/huggingface_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py b/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py index e8d1fcb1ca3..b0c4ed25f8d 100644 --- a/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py +++ b/extensions/tokenizers/src/main/python/djl_converter/huggingface_converter.py @@ -84,7 +84,7 @@ def save_onnx_model(self, model_info, task: str, args: Namespace, sys.argv.extend(["--dtype", args.dtype]) if args.trust_remote_code: sys.argv.append("--trust-remote-code") - if os.path.exists(model_id): + if task: sys.argv.extend(["--task", task]) sys.argv.append(temp_dir)