Skip to content

Commit 13e0f49

Browse files
committed
fix: use codegen for SequenceLength shape instead of manual shapes.py edit
Add SequenceLength to service-2.json and regenerate shapes.py via codegen (python -m sagemaker.core.tools.codegen) instead of editing shapes.py manually.
1 parent 7bd5df9 commit 13e0f49

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

sagemaker-core/sample/sagemaker/2017-07-24/service-2.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43236,6 +43236,10 @@
4323643236
"EvaluatorArn":{
4323743237
"shape":"EvaluatorArn",
4323843238
"documentation":"<p> The evaluator Amazon Resource Name (ARN) used as reward function or reward prompt. </p>"
43239+
},
43240+
"SequenceLength":{
43241+
"shape":"SequenceLength",
43242+
"documentation":"<p> The sequence length for the training job. </p>"
4323943243
}
4324043244
},
4324143245
"documentation":"<p> The configuration for the serverless training job. </p>"
@@ -43247,6 +43251,19 @@
4324743251
"Evaluation"
4324843252
]
4324943253
},
43254+
"SequenceLength":{
43255+
"type":"string",
43256+
"enum":[
43257+
"1K",
43258+
"2K",
43259+
"4K",
43260+
"8K",
43261+
"16K",
43262+
"32K",
43263+
"64K",
43264+
"128K"
43265+
]
43266+
},
4325043267
"ServerlessMaxConcurrency":{
4325143268
"type":"integer",
4325243269
"box":true,

sagemaker-core/src/sagemaker/core/shapes/shapes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9588,7 +9588,7 @@ class ServerlessJobConfig(Base):
95889588
peft: The parameter-efficient fine-tuning configuration.
95899589
evaluation_type: The evaluation job type. Required when serverless job type is Evaluation.
95909590
evaluator_arn: The evaluator Amazon Resource Name (ARN) used as reward function or reward prompt.
9591-
sequence_length: The sequence length for the training job. Valid values are "1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K".
9591+
sequence_length: The sequence length for the training job.
95929592
"""
95939593

95949594
base_model_arn: StrPipeVar
@@ -9600,6 +9600,7 @@ class ServerlessJobConfig(Base):
96009600
evaluator_arn: Optional[StrPipeVar] = Unassigned()
96019601
sequence_length: Optional[StrPipeVar] = Unassigned()
96029602

9603+
96039604
class MlflowConfig(Base):
96049605
"""
96059606
MlflowConfig

sagemaker-core/src/sagemaker/core/utils/code_injection/shape_dag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15877,6 +15877,7 @@
1587715877
{"name": "Peft", "shape": "Peft", "type": "string"},
1587815878
{"name": "EvaluationType", "shape": "EvaluationType", "type": "string"},
1587915879
{"name": "EvaluatorArn", "shape": "EvaluatorArn", "type": "string"},
15880+
{"name": "SequenceLength", "shape": "SequenceLength", "type": "string"},
1588015881
],
1588115882
"type": "structure",
1588215883
},

0 commit comments

Comments
 (0)