We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c91d4a commit 674f457Copy full SHA for 674f457
tests/tests_pytorch/strategies/test_ddp_integration_comm_hook.py
@@ -11,6 +11,8 @@
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
+import sys
15
+from enum import member
16
from unittest import mock
17
18
import pytest
@@ -23,6 +25,9 @@
23
25
24
26
if torch.distributed.is_available():
27
import torch.distributed.algorithms.ddp_comm_hooks.post_localSGD_hook as post_localSGD
28
+
29
+ if sys.version_info >= (3, 13):
30
+ post_localSGD = member(post_localSGD)
31
from torch.distributed.algorithms.ddp_comm_hooks import default_hooks as default
32
from torch.distributed.algorithms.ddp_comm_hooks import powerSGD_hook as powerSGD
33
0 commit comments