Skip to content

Commit

Permalink
Fix default config dicts (#329)
Browse files Browse the repository at this point in the history
* Fix default config dicts

* style
  • Loading branch information
sgugger committed Apr 28, 2022
1 parent 11e8b33 commit f0bb5f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/accelerate/commands/config/config_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ class ClusterConfig(BaseConfig):
# args for fsdp
fsdp_config: dict = None

def __post_init__(self):
if self.deepspeed_config is None:
self.deepspeed_config = {}
if self.fsdp_config is None:
self.fsdp_config = {}
return super().__post_init__()


@dataclass
class SageMakerConfig(BaseConfig):
Expand Down

0 comments on commit f0bb5f0

Please sign in to comment.