Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 84ee9af

Browse files
Polish Helm charts (#76)
* Refactored helm charts to indent 2 * Fixed resource release notes * Refactored chart descriptions * Added missing casing fixes * Added tags to chart * Fixed chart names * Added documentation in release notes * Updated job spec notes * Added job dependencies on operator * Comment out dependencies until deployed to EKS repo * Incremented chart version to match api version * Added helm 3 prerequisite
1 parent 57efa34 commit 84ee9af

File tree

24 files changed

+4174
-4111
lines changed

24 files changed

+4174
-4111
lines changed

hack/charts/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
apiVersion: v1
2-
name: sagemaker-k8s-trainingjob
3-
version: 0.1.0
4-
description: A Helm chart for deploying the SageMaker Batch Transform Job for Kubernetes.
2+
name: amazon-sagemaker-batchtransformjob
3+
version: 1.0.0
4+
description: A Helm chart for deploying a SageMaker Batch Transform Job from Kubernetes.
55
maintainers:
66
- name: Gautam Kumar
77
88
- name: Cade Daniel
99
10+
- name: Nicholas Thomson
11+
12+
- name: Meghna Baijal
13+
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
Thanks for installing the {{ .Chart.Name }}.
1+
Successfully deployed a new batch transform job chart.
22

33
Your release is named {{ .Release.Name }}.
44

55
To learn more about the release, try:
66

77
$ helm status {{ .Release.Name }}
8-
$ helm get {{ .Release.Name }}
9-
10-
To use the latest features, try adding attributes to yaml by generating it:
11-
12-
$ helm install <directory of charts> --debug --dry-run
8+
$ helm get all {{ .Release.Name }}

hack/charts/batch-transform-jobs/templates/batch-transform-job.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ metadata:
44
name: {{ .Values.name }}
55
spec:
66
region: {{ .Values.spec.region }}
7-
modelName: {{ .Values.spec.modelname | quote }}
7+
modelName: {{ .Values.spec.modelName | quote }}
88
transformInput:
9-
dataSource:
10-
s3DataSource:
11-
s3DataType: {{ .Values.spec.inputdataconfig.s3DataType | default "S3Prefix" }}
12-
s3Uri: {{ .Values.spec.inputdataconfig.s3uri }}
13-
contentType: {{ .contenttype | default "text/csv" }}
9+
dataSource:
10+
s3DataSource:
11+
s3DataType: {{ .Values.spec.inputDataConfig.s3DataType | default "S3Prefix" }}
12+
s3Uri: {{ .Values.spec.inputDataConfig.s3Uri }}
13+
contentType: {{ .contentType | default "text/csv" }}
1414
transformOutput:
15-
s3OutputPath: {{ .Values.spec.outputpath }}
15+
s3OutputPath: {{ .Values.spec.outputPath }}
1616
transformResources:
17-
instanceCount: {{ .Values.spec.instancecount }}
18-
instanceType: {{ .Values.spec.instancetype }}
17+
instanceCount: {{ .Values.spec.instanceCount }}
18+
instanceType: {{ .Values.spec.instanceType }}
19+
{{- if .Values.spec.tags }}
1920
tags:
20-
- key: test-key
21-
value: test-value
21+
{{- range $key, $value := .Values.spec.tags }}
22+
- name: {{ $key }}
23+
value: {{ $value | quote }}
24+
{{- end }}
25+
{{- end }}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: xgboost-mnist-batch-transform
22
spec:
3-
instancecount: 1
4-
instancetype: ml.m4.xlarge
5-
region: us-west-2
6-
modelname: xgboost-mnist-model
7-
inputdataconfig:
8-
s3uri: s3://sagemaker-sample-data-us-west-2/batch-transform/mnist-1000-samples
9-
s3datatype: S3Prefix
10-
outputpath: s3://my-bucket/batch_transform/output
3+
instanceCount: 1
4+
instanceType: ml.m4.xlarge
5+
region: us-west-2
6+
modelName: xgboost-mnist-model
7+
inputDataConfig:
8+
s3Uri: s3://sagemaker-sample-data-us-west-2/batch-transform/mnist-1000-samples
9+
s3DataType: S3Prefix
10+
outputPath: s3://my-bucket/batch_transform/output
1111

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
apiVersion: v1
2-
name: sagemaker-k8s-trainingjob
3-
version: 0.1.0
4-
description: A Helm chart for deploying the SageMaker Hyperparameter tuning job for Kubernetes.
2+
name: amazon-sagemaker-hyperparametertuningjob
3+
version: 1.0.0
4+
description: A Helm chart for deploying a SageMaker HyperParameter tuning job from Kubernetes.
55
maintainers:
66
- name: Gautam Kumar
77
88
- name: Cade Daniel
99
10+
- name: Nicholas Thomson
11+
12+
- name: Meghna Baijal
13+
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
Thanks for installing the {{ .Chart.Name }}.
1+
Successfully deployed a new hyperparameter tuning job chart.
22

33
Your release is named {{ .Release.Name }}.
44

55
To learn more about the release, try:
66

77
$ helm status {{ .Release.Name }}
8-
$ helm get {{ .Release.Name }}
9-
10-
To use the latest features, try adding attributes to yaml by generating it:
11-
12-
$ helm install <directory of charts> --debug --dry-run
8+
$ helm get all {{ .Release.Name }}

hack/charts/hyperparameter-tuning-jobs/templates/hpo-job.yaml

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,76 @@ kind: HyperparameterTuningJob
33
metadata:
44
name: {{ .Values.name }}
55
spec:
6-
hyperParameterTuningJobConfig:
7-
resourceLimits:
8-
maxNumberOfTrainingJobs: {{ .Values.spec.hyperparametertuningjobconfig.maxnumberoftrainingjobs}}
9-
maxParallelTrainingJobs: {{ .Values.spec.hyperparametertuningjobconfig.maxparalleltrainingjobs }}
10-
strategy: {{ .Values.spec.hyperparametertuningjobconfig.strategy | quote }}
11-
region: {{ .Values.spec.region }}
12-
tags:
13-
- key: test-key
14-
value: test-value
15-
hyperParameterTuningJobConfig:
16-
strategy: {{ .Values.spec.hyperparametertuningjobconfig.strategy | quote }}
17-
hyperParameterTuningJobObjective:
18-
type: {{ .Values.spec.hyperparametertuningjobconfig.hyperparametertuningjobobjective.type }}
19-
metricName: {{ .Values.spec.hyperparametertuningjobconfig.hyperparametertuningjobobjective.metricname }}
20-
resourceLimits:
21-
maxNumberOfTrainingJobs: {{ .Values.spec.hyperparametertuningjobconfig.maxnumberoftrainingjobs}}
22-
maxParallelTrainingJobs: {{ .Values.spec.hyperparametertuningjobconfig.maxparalleltrainingjobs }}
23-
parameterRanges:
24-
integerParameterRanges:
25-
- name: {{ .Values.spec.hyperparametertuningjobconfig.integerparameterranges.name }}
26-
minValue: {{ .Values.spec.hyperparametertuningjobconfig.integerparameterranges.minvalue | quote }}
27-
maxValue: {{ .Values.spec.hyperparametertuningjobconfig.integerparameterranges.maxvalue | quote }}
28-
scalingType: {{ .Values.spec.hyperparametertuningjobconfig.integerparameterranges.scalingtype }}
29-
# Add support for next two ranges in values.yaml
30-
continuousParameterRanges: []
31-
categoricalParameterRanges: []
32-
trainingJobEarlyStoppingType: Auto
33-
trainingJobDefinition:
34-
staticHyperParameters:
35-
{{- range $key, $value := .Values.spec.trainingjobconfig.hyperparameters }}
36-
- name: {{ $key }}
37-
value: {{ $value | quote }}
38-
{{- end }}
39-
algorithmSpecification:
40-
trainingImage: {{ .Values.spec.image }}
41-
trainingInputMode: {{ .Values.spec.traininginputmode }}
42-
roleArn: {{ .Values.spec.rolearn }}
43-
inputDataConfig:
44-
{{- range .Values.spec.inputdataconfig }}
45-
- channelName: {{ .channel }}
46-
dataSource:
47-
{{- if .s3 }}
48-
s3DataSource:
49-
s3DataType: {{ .s3.s3datatype | default "S3Prefix" }}
50-
s3Uri: {{ .s3.s3uri }}
51-
s3DataDistributionType: {{ .s3.s3datadistributiontype | default "FullyReplicated" }}
52-
{{- end }}
53-
{{- if .filesystem }}
54-
fileSystemDataSource:
55-
fileSystemId: {{ .filesystem.filesystemid }}
56-
fileSystemAccessMode: {{ .filesystemaccessmode | default "ro" }}
57-
fileSystemType: {{ .filesystem.filesystemtype }}
58-
directoryPath: {{ .filesystem.directorypath }}
59-
{{- end }}
60-
contentType: {{ .contenttype | default "text/csv" }}
61-
compressionType: {{ .compressiontype | default "None" }}
62-
recordWrapperType: {{ .recordwrappertype | default "None" }}
63-
inputMode: {{ .inputmode | default "File" }}
6+
hyperParameterTuningJobConfig:
7+
resourceLimits:
8+
maxNumberOfTrainingJobs: {{ .Values.spec.hyperparameterTuningJobConfig.maxNumberOfTrainingJobs}}
9+
maxParallelTrainingJobs: {{ .Values.spec.hyperparameterTuningJobConfig.maxParallelTrainingJobs }}
10+
strategy: {{ .Values.spec.hyperparameterTuningJobConfig.strategy | quote }}
11+
region: {{ .Values.spec.region }}
12+
hyperParameterTuningJobConfig:
13+
strategy: {{ .Values.spec.hyperparameterTuningJobConfig.strategy | quote }}
14+
hyperParameterTuningJobObjective:
15+
type: {{ .Values.spec.hyperparameterTuningJobConfig.hyperparameterTuningJobObjective.type }}
16+
metricName: {{ .Values.spec.hyperparameterTuningJobConfig.hyperparameterTuningJobObjective.metricName }}
17+
resourceLimits:
18+
maxNumberOfTrainingJobs: {{ .Values.spec.hyperparameterTuningJobConfig.maxNumberOfTrainingJobs}}
19+
maxParallelTrainingJobs: {{ .Values.spec.hyperparameterTuningJobConfig.maxParallelTrainingJobs }}
20+
parameterRanges:
21+
integerParameterRanges:
22+
- name: {{ .Values.spec.hyperparameterTuningJobConfig.integerParameterRanges.name }}
23+
minValue: {{ .Values.spec.hyperparameterTuningJobConfig.integerParameterRanges.minValue | quote }}
24+
maxValue: {{ .Values.spec.hyperparameterTuningJobConfig.integerParameterRanges.maxValue | quote }}
25+
scalingType: {{ .Values.spec.hyperparameterTuningJobConfig.integerParameterRanges.scalingType }}
26+
# Add support for next two ranges in values.yaml
27+
continuousParameterRanges: []
28+
categoricalParameterRanges: []
29+
trainingJobEarlyStoppingType: Auto
30+
trainingJobDefinition:
31+
staticHyperParameters:
32+
{{- range $key, $value := .Values.spec.trainingJobConfig.hyperparameters }}
33+
- name: {{ $key }}
34+
value: {{ $value | quote }}
35+
{{- end }}
36+
algorithmSpecification:
37+
trainingImage: {{ .Values.spec.image }}
38+
trainingInputMode: {{ .Values.spec.trainingInputMode }}
39+
roleArn: {{ .Values.spec.roleArn }}
40+
inputDataConfig:
41+
{{- range .Values.spec.inputDataConfig }}
42+
- channelName: {{ .channel }}
43+
dataSource:
44+
{{- if .s3 }}
45+
s3DataSource:
46+
s3DataType: {{ .s3.s3DataType | default "S3Prefix" }}
47+
s3Uri: {{ .s3.s3Uri }}
48+
s3DataDistributionType: {{ .s3.s3DataDistributionType | default "FullyReplicated" }}
6449
{{- end }}
65-
outputDataConfig:
66-
s3OutputPath: {{ .Values.spec.outputpath }}
67-
resourceConfig:
68-
instanceType: {{ .Values.spec.instancetype }}
69-
instanceCount: {{ .Values.spec.instancecount }}
70-
volumeSizeInGB: {{ .Values.spec.volumesize }}
71-
stoppingCondition:
72-
maxRuntimeInSeconds: {{ .Values.spec.maxruntimeinseconds }}
73-
enableNetworkIsolation: {{ .Values.spec.enablenetworkisolation }}
74-
enableInterContainerTrafficEncryption: {{ .Values.spec.enableintercontainertrafficencryption }}
50+
{{- if .fileSystem }}
51+
fileSystemDataSource:
52+
fileSystemId: {{ .fileSystem.fileSystemID }}
53+
fileSystemAccessMode: {{ .fileSystemAccessMode | default "ro" }}
54+
fileSystemType: {{ .fileSystem.fileSystemType }}
55+
directoryPath: {{ .fileSystem.directoryPath }}
56+
{{- end }}
57+
contentType: {{ .contentType | default "text/csv" }}
58+
compressionType: {{ .compressionType | default "None" }}
59+
recordWrapperType: {{ .recordWrapperType | default "None" }}
60+
inputMode: {{ .inputMode | default "File" }}
61+
{{- end }}
62+
outputDataConfig:
63+
s3OutputPath: {{ .Values.spec.outputPath }}
64+
resourceConfig:
65+
instanceType: {{ .Values.spec.instanceType }}
66+
instanceCount: {{ .Values.spec.instanceCount }}
67+
volumeSizeInGB: {{ .Values.spec.volumeSizeInGB }}
68+
stoppingCondition:
69+
maxRuntimeInSeconds: {{ .Values.spec.maxRuntimeInSeconds }}
70+
enableNetworkIsolation: {{ .Values.spec.enableNetworkIsolation }}
71+
enableInterContainerTrafficEncryption: {{ .Values.spec.enableInterContainerTrafficEncryption }}
72+
{{- if .Values.spec.tags }}
73+
tags:
74+
{{- range $key, $value := .Values.spec.tags }}
75+
- name: {{ $key }}
76+
value: {{ $value | quote }}
77+
{{- end }}
78+
{{- end }}
Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
name: xgboost-mnist-hpo
22
spec:
3-
instancecount: 1
4-
instancetype: ml.m4.xlarge
5-
volumesize: 35
6-
maxruntimeinseconds: 86400
7-
rolearn: arn:aws:iam::123456789012:role/service-role/AmazonSageMaker-ExecutionRole
8-
region: us-west-2
9-
image: 433757028032.dkr.ecr.us-west-2.amazonaws.com/xgboost:1
10-
enablenetworkisolation: true
11-
enableintercontainertrafficencryption: false
12-
traininginputmode: File
13-
hyperparametertuningjobconfig:
14-
maxnumberoftrainingjobs: 10
15-
maxparalleltrainingjobs: 10
16-
strategy: Bayesian
17-
hyperparametertuningjobobjective:
18-
type: Minimize
19-
metricname: validation:error
20-
integerparameterranges:
21-
name: num_round
22-
minvalue: 10
23-
maxvalue: 20
24-
scalingtype: Linear
25-
trainingjobconfig:
26-
hyperparameters:
27-
base_score: '0.5'
28-
booster: gbtree
29-
csv_weights: '0'
30-
dsplit: row
31-
grow_policy: depthwise
32-
lambda_bias: '0.0'
33-
max_bin: '256'
34-
max_leaves: '0'
35-
normalize_type: tree
36-
objective: reg:linear
37-
one_drop: '0'
38-
prob_buffer_row: '1.0'
39-
process_type: default
40-
rate_drop: '0.0'
41-
refresh_leaf: '1'
42-
sample_type: uniform
43-
scale_pos_weight: '1.0'
44-
silent: '0'
45-
sketch_eps: '0.03'
46-
skip_drop: '0.0'
47-
tree_method: auto
48-
tweedie_variance_power: '1.5'
49-
updater: grow_colmaker,prune
50-
inputdataconfig:
51-
- channel: train
52-
s3:
53-
s3uri: s3://my-bucket/xgboost-mnist/train/
54-
- channel: validation
55-
s3:
56-
s3uri: s3://my-bucket/xgboost-mnist/validation/
57-
outputpath: s3://my-bucket/xgboost-mnist/xgboost/
3+
instanceCount: 1
4+
instanceType: ml.m4.xlarge
5+
volumeSizeInGB: 35
6+
maxRuntimeInSeconds: 86400
7+
roleArn: arn:aws:iam::123456789012:role/service-role/AmazonSageMaker-ExecutionRole
8+
region: us-west-2
9+
image: 433757028032.dkr.ecr.us-west-2.amazonaws.com/xgboost:1
10+
enableNetworkIsolation: true
11+
enableInterContainerTrafficEncryption: false
12+
trainingInputMode: File
13+
hyperparameterTuningJobConfig:
14+
maxNumberOfTrainingJobs: 10
15+
maxParallelTrainingJobs: 10
16+
strategy: Bayesian
17+
hyperparameterTuningJobObjective:
18+
type: Minimize
19+
metricName: validation:error
20+
integerParameterRanges:
21+
name: num_round
22+
minValue: 10
23+
maxValue: 20
24+
scalingType: Linear
25+
trainingJobConfig:
26+
hyperparameters:
27+
base_score: '0.5'
28+
booster: gbtree
29+
csv_weights: '0'
30+
dsplit: row
31+
grow_policy: depthwise
32+
lambda_bias: '0.0'
33+
max_bin: '256'
34+
max_leaves: '0'
35+
normalize_type: tree
36+
objective: reg:linear
37+
one_drop: '0'
38+
prob_buffer_row: '1.0'
39+
process_type: default
40+
rate_drop: '0.0'
41+
refresh_leaf: '1'
42+
sample_type: uniform
43+
scale_pos_weight: '1.0'
44+
silent: '0'
45+
sketch_eps: '0.03'
46+
skip_drop: '0.0'
47+
tree_method: auto
48+
tweedie_variance_power: '1.5'
49+
updater: grow_colmaker,prune
50+
inputDataConfig:
51+
- channel: train
52+
s3:
53+
s3Uri: s3://my-bucket/xgboost-mnist/train/
54+
- channel: validation
55+
s3:
56+
s3Uri: s3://my-bucket/xgboost-mnist/validation/
57+
outputPath: s3://my-bucket/xgboost-mnist/xgboost/

0 commit comments

Comments
 (0)