Skip to content

Commit 6e30a4e

Browse files
author
Qian Chen
committed
test16
1 parent 748fa9a commit 6e30a4e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

buildspec.yml

Lines changed: 6 additions & 6 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,10 +41,10 @@ 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/*"
46-
- 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"
47-
- 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/*"
46+
# - 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"
47+
# - execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml" "artifacts/*"
4848

4949
# launch remote GPU instance
5050
- prefix='ml.'

src/sagemaker_mxnet_serving_container/handler_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def _user_module_transformer(model_dir=environment.model_dir):
5555
log.info(inference_script)
5656
if os.path.exists(inference_script):
5757
log.info('schenqian2')
58-
spec = importlib.util.spec_from_file_location(module_name, inference_script)
58+
try:
59+
spec = importlib.util.spec_from_file_location(module_name, inference_script)
60+
except Exception as e:
61+
log.info('schenqian5')
5962
if spec is None:
6063
log.info('schenqian4')
6164
log.info('schenqian3')

0 commit comments

Comments
 (0)