Skip to content

Commit d81afe8

Browse files
author
Deng
committed
fix flake8 error
1 parent ac88fa0 commit d81afe8

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

tests/integ/test_pytorch_train.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,23 @@
1212
# language governing permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

15-
import os
16-
1715
import numpy
16+
import os
1817
import pytest
19-
from tests.integ import DATA_DIR, PYTHON_VERSION, TRAINING_DEFAULT_TIMEOUT_MINUTES
20-
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
21-
18+
from sagemaker.pytorch.defaults import LATEST_PY2_VERSION
2219
from sagemaker.pytorch.estimator import PyTorch
2320
from sagemaker.pytorch.model import PyTorchModel
24-
from sagemaker.pytorch.defaults import LATEST_PY2_VERSION
2521
from sagemaker.utils import sagemaker_timestamp
2622

23+
from tests.integ import (
24+
test_region,
25+
DATA_DIR,
26+
PYTHON_VERSION,
27+
TRAINING_DEFAULT_TIMEOUT_MINUTES,
28+
EI_SUPPORTED_REGIONS,
29+
)
30+
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
31+
2732
MNIST_DIR = os.path.join(DATA_DIR, "pytorch_mnist")
2833
MNIST_SCRIPT = os.path.join(MNIST_DIR, "mnist.py")
2934

@@ -121,8 +126,7 @@ def test_deploy_model(pytorch_training_job, sagemaker_session, cpu_instance_type
121126

122127
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="PyTorch EIA does not support Python 2.")
123128
@pytest.mark.skipif(
124-
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
125-
reason="EI isn't supported in that specific region.",
129+
test_region() not in EI_SUPPORTED_REGIONS, reason="EI isn't supported in that specific region."
126130
)
127131
def test_deploy_model_with_accelerator(sagemaker_session, cpu_instance_type):
128132
endpoint_name = "test-pytorch-deploy-eia-{}".format(sagemaker_timestamp())

0 commit comments

Comments
 (0)