Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

endpoint-config-template.yml 2.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Description:
  3. This template is built and deployed by the infrastructure pipeline in various stages (staging/production) as required.
  4. It specifies the resources that need to be created, like the SageMaker Endpoint. It can be extended to include resources like
  5. AutoScalingPolicy, API Gateway, etc,. as required.
  6. Parameters:
  7. SageMakerProjectName:
  8. Type: String
  9. Description: Name of the project
  10. MinLength: 1
  11. MaxLength: 32
  12. AllowedPattern: ^[a-zA-Z](-*[a-zA-Z0-9])*
  13. ModelExecutionRoleArn:
  14. Type: String
  15. Description: Execution role used for deploying the model.
  16. ModelDataLocation:
  17. Type: String
  18. Description: The model.tar.gz file location
  19. ContainerImageURI:
  20. Type: String
  21. Description: The inference container image URI
  22. StageName:
  23. Type: String
  24. Description:
  25. The name for a project pipeline stage, such as Staging or Prod, for
  26. which resources are provisioned and deployed.
  27. EndpointInstanceCount:
  28. Type: Number
  29. Description: Number of instances to launch for the endpoint.
  30. MinValue: 1
  31. DataCaptureUploadPath:
  32. Type: String
  33. Description: The s3 path to which the captured data is uploaded.
  34. EndpointInstanceType:
  35. Type: String
  36. Description: The ML compute instance type for the endpoint.
  37. SamplingPercentage:
  38. Type: Number
  39. Description: The sampling percentage
  40. MinValue: 0
  41. MaxValue: 100
  42. EnableDataCapture:
  43. Description: Enable Data capture.
  44. Default: true
  45. Type: String
  46. AllowedValues: [true, false]
  47. Resources:
  48. Model:
  49. Type: AWS::SageMaker::Model
  50. Properties:
  51. Containers:
  52. - Image: !Ref ContainerImageURI
  53. ModelDataUrl: !Ref ModelDataLocation
  54. ExecutionRoleArn: !Ref ModelExecutionRoleArn
  55. EndpointConfig:
  56. Type: AWS::SageMaker::EndpointConfig
  57. Properties:
  58. ProductionVariants:
  59. - InitialInstanceCount: !Ref EndpointInstanceCount
  60. InitialVariantWeight: 1.0
  61. InstanceType: !Ref EndpointInstanceType
  62. ModelName: !GetAtt Model.ModelName
  63. VariantName: AllTraffic
  64. DataCaptureConfig:
  65. EnableCapture: !Ref EnableDataCapture
  66. InitialSamplingPercentage: !Ref SamplingPercentage
  67. DestinationS3Uri: !Ref DataCaptureUploadPath
  68. CaptureOptions:
  69. - CaptureMode: Input
  70. - CaptureMode: Output
  71. Endpoint:
  72. Type: AWS::SageMaker::Endpoint
  73. Properties:
  74. EndpointName: !Sub ${SageMakerProjectName}-${StageName}
  75. EndpointConfigName: !GetAtt EndpointConfig.EndpointConfigName
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...