Fix: improve error message on failed dataset load (#2637) [skip ci]

* fix(log): clarify error on dataset loading failed

* fix: add path for easy tracking of broken config

* fix: improve error message based on pr feedback
This commit is contained in:
NanoCode012
2025-05-07 21:29:05 +07:00
committed by Wing Lian
parent 493910559a
commit 8b0c2a71ad

View File

@@ -281,6 +281,10 @@ def load_dataset_w_config(
**load_ds_kwargs,
)
if not ds:
raise ValueError("unhandled dataset load")
raise ValueError(
"The dataset could not be loaded. This could be due to a misconfigured dataset path "
f"({config_dataset.path}). Try double-check your path / name / data_files. "
"This is not caused by the dataset type."
)
return ds