From 8b0c2a71ad38cfc96b312cf78495254cb2416d29 Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Wed, 7 May 2025 21:29:05 +0700 Subject: [PATCH] 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 --- src/axolotl/utils/data/shared.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/axolotl/utils/data/shared.py b/src/axolotl/utils/data/shared.py index e657262b9..d2e119f77 100644 --- a/src/axolotl/utils/data/shared.py +++ b/src/axolotl/utils/data/shared.py @@ -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