From: Steve Bonds Date: Tue, 16 Jul 2024 07:04:45 +0000 (-0700) Subject: export-lora : handle help argument (#8497) X-Git-Tag: upstream/0.0.4488~1084 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=37b12f92ab696d70f9a65d7447ce721b094fb32e;p=pkg%2Fggml%2Fsources%2Fllama.cpp export-lora : handle help argument (#8497) The --help option on export-lora isn't accepted as valid. The help still gets displayed by default, but the script exits with an error message and nonzero status. --- diff --git a/examples/export-lora/export-lora.cpp b/examples/export-lora/export-lora.cpp index 08413f57..16f27aa7 100644 --- a/examples/export-lora/export-lora.cpp +++ b/examples/export-lora/export-lora.cpp @@ -190,6 +190,9 @@ static bool export_lora_params_parse(int argc, char ** argv, struct export_lora_ if (params->n_threads <= 0) { params->n_threads = std::thread::hardware_concurrency(); } + } else if (arg == "-h" || arg == "--help") { + export_lora_print_usage(argc, argv, &default_params); + exit(0); } else { fprintf(stderr, "error: unknown argument: '%s'\n", arg.c_str()); export_lora_print_usage(argc, argv, &default_params);