Skip to content

Commit

Permalink
[djl-import] Fixes missing trust-remote-code arg for import model zoo
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu committed Aug 18, 2024
1 parent 429a26f commit 0812a83
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions extensions/tokenizers/src/main/python/djl_converter/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0812a83

Please sign in to comment.