Skip to content

Commit

Permalink
Add handle for empty fsdp_config[xla_fsdp_v2] (#1706)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyanwangms authored Feb 23, 2024
1 parent cd81dbd commit 990c203
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/onnxruntime/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ def __post_init__(self):
):
raise ValueError("`min_num_params` and `transformer_layer_cls_to_wrap` are mutually exclusive.")
self.fsdp_config["xla"] = self.fsdp_config.get("xla", False)
self.fsdp_config["xla_fsdp_v2"] = self.fsdp_config.get("xla_fsdp_v2", False)
self.fsdp_config["xla_fsdp_grad_ckpt"] = self.fsdp_config.get("xla_fsdp_grad_ckpt", False)
if self.fsdp_config["xla"]:
if len(self.fsdp) > 0:
Expand Down

0 comments on commit 990c203

Please sign in to comment.