Sagemaker多容器终结点错误



我正在尝试使用sagemaker多容器选项来部署模型。我使用的是最新的sagemaker版本和PyTorch型号。从我的角度来看,这看起来像是版本不匹配。

create_model_response = sm_client.create_model(
ModelName="multi-container3",
Containers=[pytorch_container, pytorch_container2],
InferenceExecutionConfig={"Mode": "Direct"},
ExecutionRoleArn=role,)

但我犯了这个错误。有线索吗?

---------------------------------------------------------------------------
ParamValidationError                      Traceback (most recent call last)
<ipython-input-96-c6e1810e5d03> in <module>
3     Containers=[pytorch_container, pytorch_container2],
4     InferenceExecutionConfig={"Mode": "Direct"},
----> 5     ExecutionRoleArn=role,
6 )
/opt/conda/lib/python3.7/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
355         use_fips_endpoint = client.meta.config.use_fips_endpoint
356         S3EndpointSetter(
--> 357             endpoint_resolver=self._endpoint_resolver,
358             region=client.meta.region_name,
359             s3_config=client.meta.config.s3,
/opt/conda/lib/python3.7/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
647             metadata=resolved,
648             signature_version=signature_version,
--> 649         )
650 
651     def _resolve_endpoint_variant_config_var(self, config_var):
/opt/conda/lib/python3.7/site-packages/botocore/client.py in _convert_to_request_dict(self, api_params, operation_model, context)
695     ):
696         if endpoint_url is None:
--> 697             # Expand the default hostname URI template.
698             hostname = self.default_endpoint.format(
699                 service=service_name, region=region_name
/opt/conda/lib/python3.7/site-packages/botocore/validate.py in serialize_to_request(self, parameters, operation_model)
295         #   "type":"string",
296         #   "min":1,
--> 297         #   "max":256
298         #  }
299         range_check(name, len(param), shape, 'invalid length', errors)
ParamValidationError: Parameter validation failed:
Unknown parameter in input: "InferenceExecutionConfig", must be one of: ModelName, PrimaryContainer, Containers, ExecutionRoleArn, Tags, VpcConfig, EnableNetworkIsolation

提前感谢

如果您有类似的框架,从我看到的pytorch来看,我建议使用MME。MCE使用多个容器的示例可以在这里找到-https://github.com/aws-samples/sagemaker-hosting/blob/main/Advanced-Model-Deployment/Serial-Inference-Pipeline/Serial-Inference-Pipeline-with-Scikit-learn-and-Linear-Learner.ipynb

最新更新