Skip to content

Commit 28b84ab

Browse files
author
Qian Chen
committed
test21
1 parent 8c2af23 commit 28b84ab

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

buildspec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ phases:
2929
- PY_COLORS=0
3030

3131
# run linters
32-
# - tox -e flake8,twine
32+
- tox -e flake8,twine
3333

3434
# run unit tests
35-
# - tox -e py36,py37,py38 test/unit
35+
- tox -e py36,py37,py38 test/unit
3636

3737
# define tags
3838
- GENERIC_CPU_TAG="$FRAMEWORK_VERSION-mxnet-cpu-$BUILD_ID"
@@ -41,8 +41,8 @@ phases:
4141
- DLC_EIA_TAG="$EIA_FRAMEWORK_VERSION-dlc-eia-$BUILD_ID"
4242

4343
# run local CPU integration tests (build and push the image to ECR repo)
44-
# - test_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/local --build-image --push-image --dockerfile-type mxnet.cpu --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --processor cpu --tag $GENERIC_CPU_TAG"
45-
# - execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml" "artifacts/*"
44+
- test_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/local --build-image --push-image --dockerfile-type mxnet.cpu --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --processor cpu --tag $GENERIC_CPU_TAG"
45+
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml" "artifacts/*"
4646
- test_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/local --build-image --push-image --dockerfile-type dlc.cpu --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --processor cpu --tag $DLC_CPU_TAG"
4747
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml" "artifacts/*"
4848

src/sagemaker_mxnet_serving_container/handler_service.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,10 @@ def __init__(self):
4747

4848
@staticmethod
4949
def _user_module_transformer(model_dir=environment.model_dir):
50-
log.info('schenqian1')
51-
log.info(model_dir)
5250
module_name = environment.Environment().module_name
53-
log.info(module_name)
5451
inference_script = model_dir + '/code' + '/{}.py'.format(module_name)
55-
log.info(inference_script)
5652
if os.path.exists(inference_script):
57-
log.info('schenqian2')
58-
try:
59-
spec = importlib.util.spec_from_file_location(module_name, inference_script)
60-
except Exception as e:
61-
log.info('schenqian5')
62-
log.info("{}".format(e))
63-
if spec is None:
64-
log.info('schenqian4')
65-
log.info('schenqian3')
53+
spec = importlib.util.spec_from_file_location(module_name, inference_script)
6654
user_module = importlib.util.module_from_spec(spec)
6755
log.info(user_module)
6856
else:

0 commit comments

Comments
 (0)