Fix an issue where gradient accumulation could not be passed as argument due to a type error. (#2910)

This commit is contained in:
Sebastiaan authored and GitHub committed 2024-02-13 18:09:59 +00:00
1 parent 57fbc07bf1
commit 4f798b23f6
1 file changed
+1 -1
+1 -1
View File
@@ -82,7 +82,7 @@ class TrainerConfig(ExperimentConfig):
"""Path to checkpoint file."""
log_gradients: bool = False
"""Optionally log gradients during training"""
gradient_accumulation_steps: Dict = field(default_factory=lambda: {})
gradient_accumulation_steps: Dict[str, int] = field(default_factory=lambda: {})
"""Number of steps to accumulate gradients over. Contains a mapping of {param_group:num}"""