By using AWS re:Post, you agree to the Terms of Use

SageMaker endpoint creation fails for Multi Model


When using scikit to create multi model, it throws an exception, but when in single model it works.

Complains about model_fn implementation or ping issues, any tips on how to fix this?

e.g container={\n", " 'Image' : image_uri,", " 'Mode': 'MultiModel',", " 'ModelDataUrl': 's3://somepatch/with/all/models/,", " 'Environment': {'SAGEMAKER_SUBMIT_DIRECTORY': mme_artifacts_path,", " 'SAGEMAKER_PROGRAM': ''} "

File "/miniconda3/bin/serve", line 8, in <module> sys.exit(serving_entrypoint()) File "/miniconda3/lib/python3.7/site-packages/sagemaker_sklearn_container/", line 144, in serving_entrypoint start_model_server() File "/miniconda3/lib/python3.7/site-packages/sagemaker_sklearn_container/", line 124, in start_model_server modules.import_module(serving_env.module_dir, serving_env.module_name) File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/", line 263, in import_module six.reraise(_errors.ImportModuleError, _errors.ImportModuleError(e), sys.exc_info()[2]) File "/miniconda3/lib/python3.7/site-packages/", line 702, in reraise raise value.with_traceback(tb) File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/", line 258, in import_module module = importlib.import_module(name) File "/miniconda3/lib/python3.7/importlib/", line 118, in import_module if name.startswith('.'):

asked 6 months ago86 views
1 Answer


We would need a bit more information to help you, including a bit more detail on how you create the model (code wise) as well as more details on the errors you receive.

I would also suggest first trying out one of the available examples for multi model endpoints, like this one: Amazon SageMaker Multi-Model Endpoints using Scikit Learn and from there modify to your own needs.

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions