File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed
src/sagemaker_mxnet_serving_container Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ phases:
29
29
- PY_COLORS=0
30
30
31
31
# run linters
32
- # - tox -e flake8,twine
32
+ - tox -e flake8,twine
33
33
34
34
# run unit tests
35
- # - tox -e py36,py37,py38 test/unit
35
+ - tox -e py36,py37,py38 test/unit
36
36
37
37
# define tags
38
38
- GENERIC_CPU_TAG="$FRAMEWORK_VERSION-mxnet-cpu-$BUILD_ID"
@@ -41,8 +41,8 @@ phases:
41
41
- DLC_EIA_TAG="$EIA_FRAMEWORK_VERSION-dlc-eia-$BUILD_ID"
42
42
43
43
# 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/*"
46
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
47
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml" "artifacts/*"
48
48
Original file line number Diff line number Diff line change @@ -47,22 +47,10 @@ def __init__(self):
47
47
48
48
@staticmethod
49
49
def _user_module_transformer (model_dir = environment .model_dir ):
50
- log .info ('schenqian1' )
51
- log .info (model_dir )
52
50
module_name = environment .Environment ().module_name
53
- log .info (module_name )
54
51
inference_script = model_dir + '/code' + '/{}.py' .format (module_name )
55
- log .info (inference_script )
56
52
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 )
66
54
user_module = importlib .util .module_from_spec (spec )
67
55
log .info (user_module )
68
56
else :
You can’t perform that action at this time.
0 commit comments