winglian commited on
Commit
3fd8093
·
unverified ·
1 Parent(s): 9b6ee83

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

Browse files

* validation for fsdp and deepspeed

* make sure to return data

src/axolotl/utils/config/models/input/v0_4_1/__init__.py CHANGED
@@ -989,3 +989,10 @@ class AxolotlConfigWCapabilities(AxolotlInputConfig):
989
  )
990
 
991
  return data
 
 
 
 
 
 
 
 
989
  )
990
 
991
  return data
992
+
993
+ @model_validator(mode="before")
994
+ @classmethod
995
+ def check_fsdp_deepspeed(cls, data):
996
+ if data.get("deepspeed") and data.get("fsdp"):
997
+ raise ValueError("deepspeed and fsdp cannot be used together.")
998
+ return data