A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 16:00 UTC
[Benchmark]Fix error message (#15866)
Signed-off-by: wangli <wangli858794774@gmail.com> Co-authored-by: Roger Wang <136131678+ywang96@users.noreply.github.com>
Li Wang committed
Apr 2, 2025 at 16:32 UTC
aa557e64227d9640e2af8c03a6fc92f3513e3f54
2 files changed
+14
-12
benchmarks/benchmark_dataset.py
-9
@@ -582,15 +582,6 @@ class HuggingFaceDataset(BenchmarkDataset):
582
) -> None:
583
super().__init__(dataset_path=dataset_path, **kwargs)
584
585
- # Validate dataset path
586
- if self.SUPPORTED_DATASET_PATHS and \
587
- self.dataset_path not in self.SUPPORTED_DATASET_PATHS:
588
- raise ValueError(
589
- f"{self.__class__.__name__} "
590
- f"only supports: {', '.join(self.SUPPORTED_DATASET_PATHS)}. "
591
- "Please consider contributing if you would "
592
- "like to add support for additional dataset formats.")
593
-
585
self.dataset_split = dataset_split
586
self.dataset_subset = dataset_subset
587
self.load_data()
benchmarks/benchmark_serving.py
+14
-3
@@ -50,9 +50,9 @@ except ImportError:
50
from argparse import ArgumentParser as FlexibleArgumentParser
51
52
from benchmark_dataset import (BurstGPTDataset, ConversationDataset,
53
- InstructCoderDataset, RandomDataset,
54
- SampleRequest, ShareGPTDataset, SonnetDataset,
55
- VisionArenaDataset)
53
+ HuggingFaceDataset, InstructCoderDataset,
54
+ RandomDataset, SampleRequest, ShareGPTDataset,
55
+ SonnetDataset, VisionArenaDataset)
56
from benchmark_utils import convert_to_pytorch_benchmark_format, write_to_json
57
58
MILLISECONDS_TO_SECONDS_CONVERSION = 1000
@@ -595,6 +595,17 @@ def main(args: argparse.Namespace):
595
args.hf_split = "train"
596
elif args.dataset_path in ConversationDataset.SUPPORTED_DATASET_PATHS:
597
dataset_class = ConversationDataset
598
+ else:
599
+ supported_datasets = set([
600
+ dataset_name for cls in HuggingFaceDataset.__subclasses__()
601
+ for dataset_name in cls.SUPPORTED_DATASET_PATHS
602
+ ])
603
+ raise ValueError(
604
+ f"Unsupported dataset path: {args.dataset_path}. "
605
+ "Huggingface dataset only supports dataset_path"
606
+ f" from one of following: {supported_datasets}. "
607
+ "Please consider contributing if you would "
608
+ "like to add support for additional dataset formats.")
609
input_requests = dataset_class(
610
dataset_path=args.dataset_path,
611
dataset_subset=args.hf_subset,