Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 46328d1

Browse files
committed
update inference path
1 parent 5cde4a4 commit 46328d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker/build_artifacts/sagemaker/python_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ def _handle_load_model_post(self, res, data): # noqa: C901
226226
)
227227

228228
def _import_custom_modules(self, model_name):
229-
inference_script_path = "/opt/ml/models/{}/model/code/inference.py".format(model_name)
230-
python_lib_path = "/opt/ml/models/{}/model/code/lib".format(model_name)
229+
inference_script_path = "/opt/ml/{}/model/code/inference.py".format(model_name)
230+
python_lib_path = "/opt/ml/{}/model/code/lib".format(model_name)
231231
if os.path.exists(python_lib_path):
232232
log.info("add Python code library path")
233233
sys.path.append(python_lib_path)
@@ -281,7 +281,7 @@ def _handle_invocation_post(self, req, res, model_name=None):
281281
res.status = falcon.HTTP_200
282282
handlers = self._handlers
283283
if SAGEMAKER_MULTI_MODEL_ENABLED and model_name in self.model_handlers:
284-
inference_script_path = "/opt/ml/models/{}/model/code/" \
284+
inference_script_path = "/opt/ml/{}/model/code/" \
285285
"inference.py".format(model_name)
286286
log.info("Inference script found at path {}.".format(inference_script_path))
287287
log.info("Inference script exists, importing handlers.")

0 commit comments

Comments
 (0)