'Sagemaker MultiModel Endpoint Custom Entrypoint Script
Im working on a multimodel endpoint for a few tensorflow models leveraging this walkthrough:
My code looks something like this:
env = {
'SAGEMAKER_REQUIREMENTS': 'requirements.txt', # path relative to `source_dir` below.
'CATEGORY': category
}
model_1 = TensorFlowModel(model_data=model_loc,
role=sagemaker_role,
framework_version="2.2.0",
source_dir="<path to source dir>",
entry_point="<source dir>/inference.py",
env=env,
sagemaker_session=sagemaker_session)
mme = MultiDataModel(name='test-endpoint',
model_data_prefix=model_prefix,
model=model_1,
sagemaker_session=sagemaker_session)
predictor = mme.deploy(instance_type="ml.r5.xlarge",
initial_instance_count=1
)
But when I try to invoke this endpoint, the error returned makes it seem like my custom entry point script isn't referenced at all? This works as intended for a single model endpoint. Any examples or documentation for a multi-model endpoint + custom entry point? I can't find much.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
