validation for fsdp and deepspeed (#1388) [skip ci]
* validation for fsdp and deepspeed * make sure to return data
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user