add sagemaker inference as a dependency in setup.py and fix unit tests #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add dependency on: https://pypi.org/project/sagemaker-inference/1.0.0/
TESTING
test/integration/local/test_default_model_fn.py::test_default_model_fn PASSED [ 2%]
test/integration/local/test_default_model_fn.py::test_default_model_fn_content_type PASSED [ 5%]
test/integration/local/test_gluon_hosting.py::test_gluon_hosting PASSED [ 8%]
test/integration/local/test_hosting.py::test_hosting PASSED [ 11%]
test/integration/local/test_onnx.py::test_onnx_import PASSED [ 14%]
test/unit/test_default_inference_handler.py::test_default_mxnet_valid_content_types PASSED [ 17%]
test/unit/test_default_inference_handler.py::test_default_model_fn PASSED [ 20%]
test/unit/test_default_inference_handler.py::test_default_model_fn_with_accelerator PASSED [ 23%]
test/unit/test_default_inference_handler.py::test_mxnet_default_input_fn_with_json PASSED [ 26%]
test/unit/test_default_inference_handler.py::test_mxnet_default_input_fn_with_npy PASSED [ 29%]
test/unit/test_default_inference_handler.py::test_mxnet_default_input_fn_with_accelerator PASSED [ 32%]
test/unit/test_default_inference_handler.py::test_mxnet_default_input_fn_invalid_content_type PASSED [ 35%]
test/unit/test_default_inference_handler.py::test_mxnet_default_output_fn PASSED [ 38%]
test/unit/test_default_inference_handler.py::test_mxnet_default_output_fn_invalid_content_type PASSED [ 41%]
test/unit/test_default_inference_handler.py::test_default_module_valid_content_types PASSED [ 44%]
test/unit/test_default_inference_handler.py::test_module_default_input_fn_with_json PASSED [ 47%]
test/unit/test_default_inference_handler.py::test_module_default_input_fn_with_csv PASSED [ 50%]
test/unit/test_default_inference_handler.py::test_module_default_input_fn_with_npy PASSED [ 52%]
test/unit/test_default_inference_handler.py::test_module_default_input_fn_with_accelerator PASSED [ 55%]
test/unit/test_default_inference_handler.py::test_module_default_input_fn_invalid_content_type PASSED [ 58%]
test/unit/test_default_inference_handler.py::test_module_default_predict_fn PASSED [ 61%]
test/unit/test_default_inference_handler.py::test_gluon_default_predict_fn PASSED [ 64%]
test/unit/test_handler_service.py::test_handler_service PASSED [ 67%]
test/unit/test_handler_service.py::test_user_module_transform_fn PASSED [ 70%]
test/unit/test_handler_service.py::test_user_module_mxnet_module_transformer PASSED [ 73%]
test/unit/test_handler_service.py::test_default_inference_handler_mxnet_gluon_transformer PASSED [ 76%]
test/unit/test_handler_service.py::test_user_module_unsupported PASSED [ 79%]
test/unit/test_mxnet_module_transformer.py::test_default_transform_fn PASSED [ 82%]
test/unit/test_mxnet_module_transformer.py::test_call_input_fn PASSED [ 85%]
test/unit/test_mxnet_module_transformer.py::test_call_input_fn_without_model_arg PASSED [ 88%]
test/unit/test_serving.py::test_main PASSED [ 91%]
test/unit/test_serving.py::test_update_env_vars PASSED [ 94%]
test/unit/test_utils.py::test_context PASSED [ 97%]
test/unit/test_utils.py::test_read_data_shapes PASSED [100%]
=================================================================================== warnings summary ===================================================================================
.tox/py36/lib/python3.6/site-packages/pkg_resources/init.py:1145
.tox/py36/lib/python3.6/site-packages/pkg_resources/init.py:1145
/Users/choidan/workspace/mms/sagemaker-mxnet-serving-container/.tox/py36/lib/python3.6/site-packages/pkg_resources/init.py:1145: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
self, resource_name
-- Docs: https://docs.pytest.org/en/latest/warnings.html
======================================================================= 34 passed, 2 warnings in 105.36 seconds ========================================================================
py36 runtests: commands[1] | coverage report --fail-under=90 --include 'sagemaker_mxnet_serving_container'
Name Stmts Miss Branch BrPart Cover
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/init.py 0 0 0 0 100%
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/default_inference_handler.py 62 7 18 3 85%
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/handler_service.py 22 0 6 0 100%
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/mxnet_module_transformer.py 20 2 2 0 91%
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/serving.py 13 0 4 1 94%
.tox/py36/lib/python3.6/site-packages/sagemaker_mxnet_serving_container/utils.py 18 0 4 1 95%
TOTAL 135 9 34 5 91%
_______________________________________________________________________________________ summary ________________________________________________________________________________________
flake8: commands succeeded
py27: commands succeeded
py36: commands succeeded
congratulations :)