mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-06 03:20:52 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -8,17 +8,18 @@ from colossalai.pipeline.stage_manager import PipelineStageManager
|
||||
|
||||
|
||||
class PipelineSchedule:
|
||||
|
||||
def __init__(self, stage_manager: PipelineStageManager) -> None:
|
||||
self.stage_manager = stage_manager
|
||||
|
||||
def forward_backward_step(self,
|
||||
model: Module,
|
||||
data_iter: Iterable,
|
||||
criterion: Callable[[Any, Any], Tensor],
|
||||
optimizer: Optional[OptimizerWrapper] = None,
|
||||
return_loss: bool = False,
|
||||
return_outputs: bool = False) -> dict:
|
||||
def forward_backward_step(
|
||||
self,
|
||||
model: Module,
|
||||
data_iter: Iterable,
|
||||
criterion: Callable[[Any, Any], Tensor],
|
||||
optimizer: Optional[OptimizerWrapper] = None,
|
||||
return_loss: bool = False,
|
||||
return_outputs: bool = False,
|
||||
) -> dict:
|
||||
"""Forward and backward step for pipeline training.
|
||||
|
||||
Args:
|
||||
|
Reference in New Issue
Block a user