|
21 | 21 |
|
22 | 22 | from sagemaker_inference import environment
|
23 | 23 | from sagemaker_pytorch_serving_container import torchserve
|
24 |
| -from sagemaker_pytorch_serving_container.torchserve import TS_NAMESPACE, REQUIREMENTS_PATH |
| 24 | +from sagemaker_pytorch_serving_container.torchserve import ( |
| 25 | + TS_NAMESPACE, REQUIREMENTS_PATH, LOG4J_OVERRIDE_PATH |
| 26 | +) |
25 | 27 |
|
26 | 28 | PYTHON_PATH = "python_path"
|
27 | 29 | DEFAULT_CONFIGURATION = "default_configuration"
|
@@ -49,7 +51,8 @@ def test_start_torchserve_default_service_handler(
|
49 | 51 |
|
50 | 52 | adapt.assert_called_once_with(torchserve.DEFAULT_HANDLER_SERVICE)
|
51 | 53 | create_config.assert_called_once_with()
|
52 |
| - exists.assert_called_once_with(REQUIREMENTS_PATH) |
| 54 | + exists.assert_any_call(REQUIREMENTS_PATH) |
| 55 | + exists.assert_any_call(LOG4J_OVERRIDE_PATH) |
53 | 56 | install_requirements.assert_called_once_with()
|
54 | 57 |
|
55 | 58 | ts_model_server_cmd = [
|
@@ -91,7 +94,8 @@ def test_start_torchserve_default_service_handler_multi_model(
|
91 | 94 | torchserve.start_torchserve()
|
92 | 95 | torchserve.ENABLE_MULTI_MODEL = False
|
93 | 96 | create_config.assert_called_once_with()
|
94 |
| - exists.assert_called_once_with(REQUIREMENTS_PATH) |
| 97 | + exists.assert_any_call(REQUIREMENTS_PATH) |
| 98 | + exists.assert_any_call(LOG4J_OVERRIDE_PATH) |
95 | 99 | install_requirements.assert_called_once_with()
|
96 | 100 |
|
97 | 101 | ts_model_server_cmd = [
|
|
0 commit comments