com.amazonaws.services.sagemaker.model.AlgorithmSpecification Maven / Gradle / Ivy
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies the training algorithm to use in a CreateTrainingJob
* request.
*
*
* For more information about algorithms provided by SageMaker, see Algorithms. For information about using your
* own algorithms, see Using Your Own
* Algorithms with Amazon SageMaker.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AlgorithmSpecification implements Serializable, Cloneable, StructuredPojo {
/**
*
* The registry path of the Docker image that contains the training algorithm. For information about docker registry
* paths for SageMaker built-in algorithms, see Docker Registry
* Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information about using your custom training container, see Using Your Own Algorithms with Amazon
* SageMaker.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*
*/
private String trainingImage;
/**
*
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that you
* created or subscribe to on Amazon Web Services Marketplace.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the TrainingImage
* parameter. If you specify a value for the AlgorithmName
parameter, you can't specify a value for
* TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value for both
* parameters, the training job might raise a null
error.
*
*
*/
private String algorithmName;
private String trainingInputMode;
/**
*
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse
* algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*
*/
private java.util.List metricDefinitions;
/**
*
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*
*/
private Boolean enableSageMakerMetricsTimeSeries;
/**
*
* The entrypoint script for a Docker container used
* to run a training job. This script takes precedence over the default train processing instructions. See How Amazon
* SageMaker Runs Your Training Image for more information.
*
*/
private java.util.List containerEntrypoint;
/**
*
* The arguments for a container used to run a training job. See How Amazon
* SageMaker Runs Your Training Image for additional information.
*
*/
private java.util.List containerArguments;
/**
*
* The configuration to use an image from a private Docker registry for a training job.
*
*/
private TrainingImageConfig trainingImageConfig;
/**
*
* The registry path of the Docker image that contains the training algorithm. For information about docker registry
* paths for SageMaker built-in algorithms, see Docker Registry
* Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information about using your custom training container, see Using Your Own Algorithms with Amazon
* SageMaker.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*
*
* @param trainingImage
* The registry path of the Docker image that contains the training algorithm. For information about docker
* registry paths for SageMaker built-in algorithms, see Docker
* Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports
* both registry/repository[:tag]
and registry/repository[@digest]
image path
* formats. For more information about using your custom training container, see Using Your Own Algorithms with
* Amazon SageMaker.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of
* the algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*/
public void setTrainingImage(String trainingImage) {
this.trainingImage = trainingImage;
}
/**
*
* The registry path of the Docker image that contains the training algorithm. For information about docker registry
* paths for SageMaker built-in algorithms, see Docker Registry
* Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information about using your custom training container, see Using Your Own Algorithms with Amazon
* SageMaker.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*
*
* @return The registry path of the Docker image that contains the training algorithm. For information about docker
* registry paths for SageMaker built-in algorithms, see Docker
* Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports
* both registry/repository[:tag]
and registry/repository[@digest]
image path
* formats. For more information about using your custom training container, see Using Your Own Algorithms
* with Amazon SageMaker.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI
* of the algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*/
public String getTrainingImage() {
return this.trainingImage;
}
/**
*
* The registry path of the Docker image that contains the training algorithm. For information about docker registry
* paths for SageMaker built-in algorithms, see Docker Registry
* Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information about using your custom training container, see Using Your Own Algorithms with Amazon
* SageMaker.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
*
*
* @param trainingImage
* The registry path of the Docker image that contains the training algorithm. For information about docker
* registry paths for SageMaker built-in algorithms, see Docker
* Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports
* both registry/repository[:tag]
and registry/repository[@digest]
image path
* formats. For more information about using your custom training container, see Using Your Own Algorithms with
* Amazon SageMaker.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of
* the algorithm container to the TrainingImage
parameter.
*
*
* For more information, see the note in the AlgorithmName
parameter description.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withTrainingImage(String trainingImage) {
setTrainingImage(trainingImage);
return this;
}
/**
*
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that you
* created or subscribe to on Amazon Web Services Marketplace.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the TrainingImage
* parameter. If you specify a value for the AlgorithmName
parameter, you can't specify a value for
* TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value for both
* parameters, the training job might raise a null
error.
*
*
*
* @param algorithmName
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that
* you created or subscribe to on Amazon Web Services Marketplace.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of
* the algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the
* TrainingImage
parameter. If you specify a value for the AlgorithmName
parameter,
* you can't specify a value for TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value
* for both parameters, the training job might raise a null
error.
*
*/
public void setAlgorithmName(String algorithmName) {
this.algorithmName = algorithmName;
}
/**
*
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that you
* created or subscribe to on Amazon Web Services Marketplace.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the TrainingImage
* parameter. If you specify a value for the AlgorithmName
parameter, you can't specify a value for
* TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value for both
* parameters, the training job might raise a null
error.
*
*
*
* @return The name of the algorithm resource to use for the training job. This must be an algorithm resource that
* you created or subscribe to on Amazon Web Services Marketplace.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI
* of the algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the
* TrainingImage
parameter. If you specify a value for the AlgorithmName
* parameter, you can't specify a value for TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value
* for both parameters, the training job might raise a null
error.
*
*/
public String getAlgorithmName() {
return this.algorithmName;
}
/**
*
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that you
* created or subscribe to on Amazon Web Services Marketplace.
*
*
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of the
* algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the TrainingImage
* parameter. If you specify a value for the AlgorithmName
parameter, you can't specify a value for
* TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value for both
* parameters, the training job might raise a null
error.
*
*
*
* @param algorithmName
* The name of the algorithm resource to use for the training job. This must be an algorithm resource that
* you created or subscribe to on Amazon Web Services Marketplace.
*
* You must specify either the algorithm name to the AlgorithmName
parameter or the image URI of
* the algorithm container to the TrainingImage
parameter.
*
*
* Note that the AlgorithmName
parameter is mutually exclusive with the
* TrainingImage
parameter. If you specify a value for the AlgorithmName
parameter,
* you can't specify a value for TrainingImage
, and vice versa.
*
*
* If you specify values for both parameters, the training job might break; if you don't specify any value
* for both parameters, the training job might raise a null
error.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withAlgorithmName(String algorithmName) {
setAlgorithmName(algorithmName);
return this;
}
/**
* @param trainingInputMode
* @see TrainingInputMode
*/
public void setTrainingInputMode(String trainingInputMode) {
this.trainingInputMode = trainingInputMode;
}
/**
* @return
* @see TrainingInputMode
*/
public String getTrainingInputMode() {
return this.trainingInputMode;
}
/**
* @param trainingInputMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see TrainingInputMode
*/
public AlgorithmSpecification withTrainingInputMode(String trainingInputMode) {
setTrainingInputMode(trainingInputMode);
return this;
}
/**
* @param trainingInputMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see TrainingInputMode
*/
public AlgorithmSpecification withTrainingInputMode(TrainingInputMode trainingInputMode) {
this.trainingInputMode = trainingInputMode.toString();
return this;
}
/**
*
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse
* algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*
*
* @return A list of metric definition objects. Each object specifies the metric name and regular expressions used
* to parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*/
public java.util.List getMetricDefinitions() {
return metricDefinitions;
}
/**
*
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse
* algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*
*
* @param metricDefinitions
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to
* parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*/
public void setMetricDefinitions(java.util.Collection metricDefinitions) {
if (metricDefinitions == null) {
this.metricDefinitions = null;
return;
}
this.metricDefinitions = new java.util.ArrayList(metricDefinitions);
}
/**
*
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse
* algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setMetricDefinitions(java.util.Collection)} or {@link #withMetricDefinitions(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param metricDefinitions
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to
* parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withMetricDefinitions(MetricDefinition... metricDefinitions) {
if (this.metricDefinitions == null) {
setMetricDefinitions(new java.util.ArrayList(metricDefinitions.length));
}
for (MetricDefinition ele : metricDefinitions) {
this.metricDefinitions.add(ele);
}
return this;
}
/**
*
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse
* algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
*
*
* @param metricDefinitions
* A list of metric definition objects. Each object specifies the metric name and regular expressions used to
* parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withMetricDefinitions(java.util.Collection metricDefinitions) {
setMetricDefinitions(metricDefinitions);
return this;
}
/**
*
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*
*
* @param enableSageMakerMetricsTimeSeries
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*/
public void setEnableSageMakerMetricsTimeSeries(Boolean enableSageMakerMetricsTimeSeries) {
this.enableSageMakerMetricsTimeSeries = enableSageMakerMetricsTimeSeries;
}
/**
*
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*
*
* @return To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*/
public Boolean getEnableSageMakerMetricsTimeSeries() {
return this.enableSageMakerMetricsTimeSeries;
}
/**
*
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*
*
* @param enableSageMakerMetricsTimeSeries
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withEnableSageMakerMetricsTimeSeries(Boolean enableSageMakerMetricsTimeSeries) {
setEnableSageMakerMetricsTimeSeries(enableSageMakerMetricsTimeSeries);
return this;
}
/**
*
* To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*
*
* @return To generate and save time-series metrics during training, set to true
. The default is
* false
and time-series metrics aren't generated except in the following cases:
*
* -
*
* You use one of the SageMaker built-in algorithms
*
*
* -
*
* You use one of the following Prebuilt SageMaker Docker Images:
*
*
* -
*
* Tensorflow (version >= 1.15)
*
*
* -
*
* MXNet (version >= 1.6)
*
*
* -
*
* PyTorch (version >= 1.3)
*
*
*
*
* -
*
* You specify at least one MetricDefinition
*
*
*/
public Boolean isEnableSageMakerMetricsTimeSeries() {
return this.enableSageMakerMetricsTimeSeries;
}
/**
*
* The entrypoint script for a Docker container used
* to run a training job. This script takes precedence over the default train processing instructions. See How Amazon
* SageMaker Runs Your Training Image for more information.
*
*
* @return The entrypoint script for a Docker
* container used to run a training job. This script takes precedence over the default train processing
* instructions. See How
* Amazon SageMaker Runs Your Training Image for more information.
*/
public java.util.List getContainerEntrypoint() {
return containerEntrypoint;
}
/**
*
* The entrypoint script for a Docker container used
* to run a training job. This script takes precedence over the default train processing instructions. See How Amazon
* SageMaker Runs Your Training Image for more information.
*
*
* @param containerEntrypoint
* The entrypoint script for a Docker
* container used to run a training job. This script takes precedence over the default train processing
* instructions. See How
* Amazon SageMaker Runs Your Training Image for more information.
*/
public void setContainerEntrypoint(java.util.Collection containerEntrypoint) {
if (containerEntrypoint == null) {
this.containerEntrypoint = null;
return;
}
this.containerEntrypoint = new java.util.ArrayList(containerEntrypoint);
}
/**
*
* The entrypoint script for a Docker container used
* to run a training job. This script takes precedence over the default train processing instructions. See How Amazon
* SageMaker Runs Your Training Image for more information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContainerEntrypoint(java.util.Collection)} or {@link #withContainerEntrypoint(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param containerEntrypoint
* The entrypoint script for a Docker
* container used to run a training job. This script takes precedence over the default train processing
* instructions. See How
* Amazon SageMaker Runs Your Training Image for more information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withContainerEntrypoint(String... containerEntrypoint) {
if (this.containerEntrypoint == null) {
setContainerEntrypoint(new java.util.ArrayList(containerEntrypoint.length));
}
for (String ele : containerEntrypoint) {
this.containerEntrypoint.add(ele);
}
return this;
}
/**
*
* The entrypoint script for a Docker container used
* to run a training job. This script takes precedence over the default train processing instructions. See How Amazon
* SageMaker Runs Your Training Image for more information.
*
*
* @param containerEntrypoint
* The entrypoint script for a Docker
* container used to run a training job. This script takes precedence over the default train processing
* instructions. See How
* Amazon SageMaker Runs Your Training Image for more information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withContainerEntrypoint(java.util.Collection containerEntrypoint) {
setContainerEntrypoint(containerEntrypoint);
return this;
}
/**
*
* The arguments for a container used to run a training job. See How Amazon
* SageMaker Runs Your Training Image for additional information.
*
*
* @return The arguments for a container used to run a training job. See How
* Amazon SageMaker Runs Your Training Image for additional information.
*/
public java.util.List getContainerArguments() {
return containerArguments;
}
/**
*
* The arguments for a container used to run a training job. See How Amazon
* SageMaker Runs Your Training Image for additional information.
*
*
* @param containerArguments
* The arguments for a container used to run a training job. See How
* Amazon SageMaker Runs Your Training Image for additional information.
*/
public void setContainerArguments(java.util.Collection containerArguments) {
if (containerArguments == null) {
this.containerArguments = null;
return;
}
this.containerArguments = new java.util.ArrayList(containerArguments);
}
/**
*
* The arguments for a container used to run a training job. See How Amazon
* SageMaker Runs Your Training Image for additional information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContainerArguments(java.util.Collection)} or {@link #withContainerArguments(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param containerArguments
* The arguments for a container used to run a training job. See How
* Amazon SageMaker Runs Your Training Image for additional information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withContainerArguments(String... containerArguments) {
if (this.containerArguments == null) {
setContainerArguments(new java.util.ArrayList(containerArguments.length));
}
for (String ele : containerArguments) {
this.containerArguments.add(ele);
}
return this;
}
/**
*
* The arguments for a container used to run a training job. See How Amazon
* SageMaker Runs Your Training Image for additional information.
*
*
* @param containerArguments
* The arguments for a container used to run a training job. See How
* Amazon SageMaker Runs Your Training Image for additional information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withContainerArguments(java.util.Collection containerArguments) {
setContainerArguments(containerArguments);
return this;
}
/**
*
* The configuration to use an image from a private Docker registry for a training job.
*
*
* @param trainingImageConfig
* The configuration to use an image from a private Docker registry for a training job.
*/
public void setTrainingImageConfig(TrainingImageConfig trainingImageConfig) {
this.trainingImageConfig = trainingImageConfig;
}
/**
*
* The configuration to use an image from a private Docker registry for a training job.
*
*
* @return The configuration to use an image from a private Docker registry for a training job.
*/
public TrainingImageConfig getTrainingImageConfig() {
return this.trainingImageConfig;
}
/**
*
* The configuration to use an image from a private Docker registry for a training job.
*
*
* @param trainingImageConfig
* The configuration to use an image from a private Docker registry for a training job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AlgorithmSpecification withTrainingImageConfig(TrainingImageConfig trainingImageConfig) {
setTrainingImageConfig(trainingImageConfig);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getTrainingImage() != null)
sb.append("TrainingImage: ").append(getTrainingImage()).append(",");
if (getAlgorithmName() != null)
sb.append("AlgorithmName: ").append(getAlgorithmName()).append(",");
if (getTrainingInputMode() != null)
sb.append("TrainingInputMode: ").append(getTrainingInputMode()).append(",");
if (getMetricDefinitions() != null)
sb.append("MetricDefinitions: ").append(getMetricDefinitions()).append(",");
if (getEnableSageMakerMetricsTimeSeries() != null)
sb.append("EnableSageMakerMetricsTimeSeries: ").append(getEnableSageMakerMetricsTimeSeries()).append(",");
if (getContainerEntrypoint() != null)
sb.append("ContainerEntrypoint: ").append(getContainerEntrypoint()).append(",");
if (getContainerArguments() != null)
sb.append("ContainerArguments: ").append(getContainerArguments()).append(",");
if (getTrainingImageConfig() != null)
sb.append("TrainingImageConfig: ").append(getTrainingImageConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AlgorithmSpecification == false)
return false;
AlgorithmSpecification other = (AlgorithmSpecification) obj;
if (other.getTrainingImage() == null ^ this.getTrainingImage() == null)
return false;
if (other.getTrainingImage() != null && other.getTrainingImage().equals(this.getTrainingImage()) == false)
return false;
if (other.getAlgorithmName() == null ^ this.getAlgorithmName() == null)
return false;
if (other.getAlgorithmName() != null && other.getAlgorithmName().equals(this.getAlgorithmName()) == false)
return false;
if (other.getTrainingInputMode() == null ^ this.getTrainingInputMode() == null)
return false;
if (other.getTrainingInputMode() != null && other.getTrainingInputMode().equals(this.getTrainingInputMode()) == false)
return false;
if (other.getMetricDefinitions() == null ^ this.getMetricDefinitions() == null)
return false;
if (other.getMetricDefinitions() != null && other.getMetricDefinitions().equals(this.getMetricDefinitions()) == false)
return false;
if (other.getEnableSageMakerMetricsTimeSeries() == null ^ this.getEnableSageMakerMetricsTimeSeries() == null)
return false;
if (other.getEnableSageMakerMetricsTimeSeries() != null
&& other.getEnableSageMakerMetricsTimeSeries().equals(this.getEnableSageMakerMetricsTimeSeries()) == false)
return false;
if (other.getContainerEntrypoint() == null ^ this.getContainerEntrypoint() == null)
return false;
if (other.getContainerEntrypoint() != null && other.getContainerEntrypoint().equals(this.getContainerEntrypoint()) == false)
return false;
if (other.getContainerArguments() == null ^ this.getContainerArguments() == null)
return false;
if (other.getContainerArguments() != null && other.getContainerArguments().equals(this.getContainerArguments()) == false)
return false;
if (other.getTrainingImageConfig() == null ^ this.getTrainingImageConfig() == null)
return false;
if (other.getTrainingImageConfig() != null && other.getTrainingImageConfig().equals(this.getTrainingImageConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTrainingImage() == null) ? 0 : getTrainingImage().hashCode());
hashCode = prime * hashCode + ((getAlgorithmName() == null) ? 0 : getAlgorithmName().hashCode());
hashCode = prime * hashCode + ((getTrainingInputMode() == null) ? 0 : getTrainingInputMode().hashCode());
hashCode = prime * hashCode + ((getMetricDefinitions() == null) ? 0 : getMetricDefinitions().hashCode());
hashCode = prime * hashCode + ((getEnableSageMakerMetricsTimeSeries() == null) ? 0 : getEnableSageMakerMetricsTimeSeries().hashCode());
hashCode = prime * hashCode + ((getContainerEntrypoint() == null) ? 0 : getContainerEntrypoint().hashCode());
hashCode = prime * hashCode + ((getContainerArguments() == null) ? 0 : getContainerArguments().hashCode());
hashCode = prime * hashCode + ((getTrainingImageConfig() == null) ? 0 : getTrainingImageConfig().hashCode());
return hashCode;
}
@Override
public AlgorithmSpecification clone() {
try {
return (AlgorithmSpecification) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.sagemaker.model.transform.AlgorithmSpecificationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}