Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stepfunctions-tasks): add enableNetworkIsolation property to SageMakerCreateTrainingJobProps #16792

Merged
merged 11 commits into from
Oct 18, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ export interface SageMakerCreateTrainingJobProps extends sfn.TaskStateBaseProps
*/
readonly algorithmSpecification: AlgorithmSpecification;

/**
* Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
TakaakiFuruse marked this conversation as resolved.
Show resolved Hide resolved
*
* @default false
*/
readonly enableNetworkIsolation?: boolean;

/**
* Algorithm-specific parameters that influence the quality of the model. Set hyperparameters before you start the learning process.
* For a list of hyperparameters provided by Amazon SageMaker
Expand Down Expand Up @@ -217,6 +224,7 @@ export class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam
private renderParameters(): { [key: string]: any } {
return {
TrainingJobName: this.props.trainingJobName,
EnableNetworkIsolation: this.props.enableNetworkIsolation,
RoleArn: this._role!.roleArn,
...this.renderAlgorithmSpecification(this.algorithmSpecification),
...this.renderInputDataConfig(this.inputDataConfig),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ test('create complex training job', () => {
},
],
},
enableNetworkIsolation: true,
hyperparameters: {
lr: '0.1',
},
Expand Down Expand Up @@ -221,6 +222,7 @@ test('create complex training job', () => {
{ Name: 'mymetric', Regex: 'regex_pattern' },
],
},
EnableNetworkIsolation: true,
HyperParameters: {
lr: '0.1',
},
Expand Down