From 0812a83625ee276af05f643fdcdabcd63d3f2b55 Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Sun, 18 Aug 2024 12:08:56 -0700 Subject: [PATCH] [djl-import] Fixes missing trust-remote-code arg for import model zoo --- .../src/main/python/djl_converter/arg_parser.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 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 37df510a4eeb..82613ae1635a 100644 --- a/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py +++ b/extensions/tokenizers/src/main/python/djl_converter/arg_parser.py @@ -45,8 +45,9 @@ def converter_args(): parser.add_argument( "--trust-remote-code", action="store_true", - help= - "Allows to use custom code for the modeling hosted in the model repository. This option should only be set for repositories you trust and in which you have read the code, as it will execute on your local machine arbitrary code present in the model repository." + help="Allows to use custom code for the modeling hosted in the model repository." + " This option should only be set for repositories you trust and in which you have read the code," + " as it will execute on your local machine arbitrary code present in the model repository." ) args = parser.parse_args() @@ -84,6 +85,13 @@ def importer_args(): help="Model category to convert", ) group.add_argument("-m", "--model-name", help="Model name to convert") + parser.add_argument( + "--trust-remote-code", + action="store_true", + help="Allows to use custom code for the modeling hosted in the model repository." + " This option should only be set for repositories you trust and in which you have read the code," + " as it will execute on your local machine arbitrary code present in the model repository." + ) args = parser.parse_args() if args.output_dir is None: