From 3fd80937172086e7e2e6e27f4e9ef54e2a1fae8a Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Sun, 10 Mar 2024 20:49:25 -0400 Subject: [PATCH] validation for fsdp and deepspeed (#1388) [skip ci] * validation for fsdp and deepspeed * make sure to return data --- src/axolotl/utils/config/models/input/v0_4_1/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/axolotl/utils/config/models/input/v0_4_1/__init__.py b/src/axolotl/utils/config/models/input/v0_4_1/__init__.py index 79fffe9cd..3236bc643 100644 --- a/src/axolotl/utils/config/models/input/v0_4_1/__init__.py +++ b/src/axolotl/utils/config/models/input/v0_4_1/__init__.py @@ -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