Skip to content

Commit

Permalink
Update dataclasses.py (#2168)
Browse files Browse the repository at this point in the history
Bug fix: recompute_activation -> recompute_activations
  • Loading branch information
yuanenming authored Nov 20, 2023
1 parent 62af737 commit fbe00d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/accelerate/utils/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ class MegatronLMPlugin:
default=None,
metadata={"help": "enable sequence parallelism"},
)
recompute_activation: bool = field(
recompute_activations: bool = field(
default=None,
metadata={"help": "enable selective activation recomputation"},
)
Expand Down Expand Up @@ -1196,8 +1196,8 @@ def __post_init__(self):
self.num_micro_batches = int(os.environ.get(prefix + "NUM_MICRO_BATCHES", 1))
if self.gradient_clipping is None:
self.gradient_clipping = float(os.environ.get(prefix + "GRADIENT_CLIPPING", 1.0))
if self.recompute_activation is None:
self.recompute_activation = str_to_bool(os.environ.get(prefix + "RECOMPUTE_ACTIVATION", "False")) == 1
if self.recompute_activations is None:
self.recompute_activations = str_to_bool(os.environ.get(prefix + "RECOMPUTE_ACTIVATIONS", "False")) == 1
if self.use_distributed_optimizer is None:
self.use_distributed_optimizer = (
str_to_bool(os.environ.get(prefix + "USE_DISTRIBUTED_OPTIMIZER", "False")) == 1
Expand Down Expand Up @@ -1234,7 +1234,7 @@ def __post_init__(self):
"eval_iters": self.eval_iters,
"eval_interval": self.eval_interval,
}
if self.recompute_activation:
if self.recompute_activations:
self.megatron_lm_default_args["recompute_granularity"] = "selective"
if self.tensorboard_dir is not None:
self.megatron_lm_default_args["tensorboard_dir"] = self.tensorboard_dir
Expand Down

0 comments on commit fbe00d7

Please sign in to comment.