From 9d31db2dd1f7a5b28c0e6155e22b9d02806c815d Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 16 Jun 2023 08:40:59 +0000 Subject: [PATCH] [format] applied code formatting on changed files in pull request 4021 --- colossalai/nn/layer/base_layer.py | 3 ++- tests/test_device/test_device_mesh.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/colossalai/nn/layer/base_layer.py b/colossalai/nn/layer/base_layer.py index c85f53cc44c3..5234b6b1a1b5 100644 --- a/colossalai/nn/layer/base_layer.py +++ b/colossalai/nn/layer/base_layer.py @@ -1,11 +1,12 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- +from contextlib import contextmanager + import torch.nn as nn from colossalai.context import ParallelMode from colossalai.core import global_context as gpc -from contextlib import contextmanager class ParallelLayer(nn.Module): diff --git a/tests/test_device/test_device_mesh.py b/tests/test_device/test_device_mesh.py index 3be057b3a98b..789ce8ab35b8 100644 --- a/tests/test_device/test_device_mesh.py +++ b/tests/test_device/test_device_mesh.py @@ -1,6 +1,7 @@ -from colossalai.device.device_mesh import DeviceMesh import torch +from colossalai.device.device_mesh import DeviceMesh + def test_device_mesh(): physical_mesh_id = torch.arange(0, 16).reshape(2, 8)