Skip to content

Commit d975305

Browse files
committed
conditionally import enum.member
1 parent 674f457 commit d975305

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/tests_pytorch/strategies/test_ddp_integration_comm_hook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import sys
15-
from enum import member
1615
from unittest import mock
1716

1817
import pytest
@@ -27,6 +26,8 @@
2726
import torch.distributed.algorithms.ddp_comm_hooks.post_localSGD_hook as post_localSGD
2827

2928
if sys.version_info >= (3, 13):
29+
from enum import member
30+
3031
post_localSGD = member(post_localSGD)
3132
from torch.distributed.algorithms.ddp_comm_hooks import default_hooks as default
3233
from torch.distributed.algorithms.ddp_comm_hooks import powerSGD_hook as powerSGD

0 commit comments

Comments
 (0)