简体   繁体   中英

How to invoke a serverless endpoint in aws sagemaker?

based on aws documetation ( https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-create.html ),

response = client.create_endpoint_config(
   EndpointConfigName="<your-endpoint-configuration>",
   ProductionVariants=[
        {
            "ModelName": "<your-model-name>",
            "VariantName": "AllTraffic",
            "ServerlessConfig": {
                "MemorySizeInMB": 2048,
                "MaxConcurrency": 20
            }
        } 
    ]
)

i created an serverless endpoint (sample code above), but I keep getting error when the endpoint is invoked, has anyone run into this issue - 'Error - /.sagemaker/ts/models/model.mar already exists. Please specify --force/-f option to overwrite the model archive output file'. FYI - this worked when the endpoint was configured provisioned instead of serverless.

You can checkout a few examples we created here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM