[Benchmark]Fix error message (#15866)

Signed-off-by: wangli <wangli858794774@gmail.com>
Co-authored-by: Roger Wang <136131678+ywang96@users.noreply.github.com>
This commit is contained in:
Li Wang
2025-04-02 16:32:24 +08:00
committed by GitHub
parent 0e00d40e4f
commit aa557e6422
2 changed files with 14 additions and 12 deletions

View File

@@ -582,15 +582,6 @@ class HuggingFaceDataset(BenchmarkDataset):
) -> None:
super().__init__(dataset_path=dataset_path, **kwargs)
# Validate dataset path
if self.SUPPORTED_DATASET_PATHS and \
self.dataset_path not in self.SUPPORTED_DATASET_PATHS:
raise ValueError(
f"{self.__class__.__name__} "
f"only supports: {', '.join(self.SUPPORTED_DATASET_PATHS)}. "
"Please consider contributing if you would "
"like to add support for additional dataset formats.")
self.dataset_split = dataset_split
self.dataset_subset = dataset_subset
self.load_data()