[booster] fix no_sync method (#3709)

* [booster] fix no_sync method

* [booster] add test for ddp no_sync

* [booster] fix merge

* [booster] update unit test

* [booster] update unit test

* [booster] update unit test
This commit is contained in:
Hongxin Liu
2023-05-09 11:10:02 +08:00
committed by GitHub
parent 3bf09efe74
commit 6552cbf8e1
6 changed files with 85 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import logging
import os
import warnings
from pathlib import Path
from typing import Callable, List, Optional, Tuple, Union
from typing import Callable, Iterator, List, Optional, Tuple, Union
import torch
import torch.nn as nn
@@ -286,3 +286,6 @@ class GeminiPlugin(DPPluginBase):
def get_checkpoint_io(self) -> CheckpointIO:
return GeminiCheckpointIO()
def no_sync(self, model: nn.Module) -> Iterator[None]:
raise NotImplementedError