validation for fsdp and deepspeed (#1388) [skip ci]

* validation for fsdp and deepspeed

* make sure to return data
This commit is contained in:
Wing Lian
2024-03-10 20:49:25 -04:00
committed by GitHub
parent 9b6ee83a73
commit 3fd8093717

View File

@@ -989,3 +989,10 @@ class AxolotlConfigWCapabilities(AxolotlInputConfig):
)
return data
@model_validator(mode="before")
@classmethod
def check_fsdp_deepspeed(cls, data):
if data.get("deepspeed") and data.get("fsdp"):
raise ValueError("deepspeed and fsdp cannot be used together.")
return data