common : add specific warning for multiple -m options
This commit updates the deprecation warning for multiple model options with a specific message that does not mention comma-separated values as an option. The motivation for this is that currently it can be confusing if multiple model options are specified with llama-server as this would display the following warning: ```console DEPRECATED: argument '--model' specified multiple times, use comma-separated values instead (only last value will be used) ``` But llama-server does not support a comma-separated models option. With this change the user is informed that multiple models can be supported in router mode if using llama-server: ```console DEPRECATED: multiple --model options are not supported (only last value will be used). Use router mode for llama-server (see --help) ```
This commit is contained in:
parent
56f3ebf38e
commit
b96d588668
|
|
@ -489,7 +489,12 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
|
|||
throw std::invalid_argument(string_format("error: invalid argument: %s", arg.c_str()));
|
||||
}
|
||||
if (!seen_args.insert(arg).second) {
|
||||
LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str());
|
||||
if (arg == "-m" || arg == "--model") {
|
||||
LOG_WRN("DEPRECATED: multiple %s options are not supported (only last value will be used). "
|
||||
"Use router mode for llama-server (see --help)\n", arg.c_str());
|
||||
} else {
|
||||
LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str());
|
||||
}
|
||||
}
|
||||
auto & tmp = arg_to_options[arg];
|
||||
auto opt = *tmp.first;
|
||||
|
|
@ -848,7 +853,12 @@ bool common_params_to_map(int argc, char ** argv, llama_example ex, std::map<com
|
|||
throw std::invalid_argument(string_format("error: invalid argument: %s", arg.c_str()));
|
||||
}
|
||||
if (!seen_args.insert(arg).second) {
|
||||
LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str());
|
||||
if (arg == "-m" || arg == "--model") {
|
||||
LOG_WRN("DEPRECATED: multiple %s options are not supported (only last value will be used). "
|
||||
"Use router mode for llama-server (see --help)\n", arg.c_str());
|
||||
} else {
|
||||
LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str());
|
||||
}
|
||||
}
|
||||
auto opt = *arg_to_options[arg];
|
||||
std::string val;
|
||||
|
|
|
|||
Loading…
Reference in New Issue