[Bugfix] Fix dataset name and path argument validation bug in vllm bench serve (#40288)
Signed-off-by: talora <talora@nvidia.com> Signed-off-by: Talor Abramovich <talor19@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent
d249a9e90e
commit
7b1e0b07d0
@@ -1711,12 +1711,25 @@ async def main_async(args: argparse.Namespace) -> dict[str, Any]:
|
||||
trust_remote_code=args.trust_remote_code,
|
||||
)
|
||||
|
||||
# Validate dataset name/path
|
||||
if args.dataset_name is None:
|
||||
raise ValueError(
|
||||
"Please specify '--dataset-name' and the corresponding "
|
||||
"'--dataset-path' if required."
|
||||
)
|
||||
|
||||
if (
|
||||
args.dataset_name
|
||||
in ["random", "random-mm", "random-rerank", "prefix_repetition"]
|
||||
and args.dataset_path is not None
|
||||
):
|
||||
raise ValueError(
|
||||
f"Cannot use '{args.dataset_name}' dataset with --dataset-path. "
|
||||
"Please specify the appropriate --dataset-name (e.g., "
|
||||
"'sharegpt', 'custom', 'sonnet') for your dataset file: "
|
||||
f"{args.dataset_path}"
|
||||
)
|
||||
|
||||
# Map general --input-len and --output-len to all dataset-specific arguments
|
||||
if args.input_len is not None:
|
||||
args.random_input_len = args.input_len
|
||||
|
||||
Reference in New Issue
Block a user