fix: handle sharegpt dataset missing (#2035)

* fix: handle sharegpt dataset missing

* fix: explanation

* feat: add test
This commit is contained in:
NanoCode012
2024-11-12 12:51:37 +07:00
committed by GitHub
parent 3931a42763
commit 9f1cf9b17c
2 changed files with 62 additions and 1 deletions

View File

@@ -789,7 +789,12 @@ class AxolotlInputConfig(
if not ds_cfg.get("type"):
continue
if ds_cfg["type"].startswith("sharegpt"):
ds_type = ds_cfg["type"]
# skip if it's a dict (for custom user instruction prompt)
if isinstance(ds_type, dict):
continue
if isinstance(ds_type, str) and ds_type.startswith("sharegpt"):
raise ValueError(
"`type: sharegpt.*` is deprecated. Please use `type: chat_template` instead."
)