/* * Copyright 2018-2023 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; /** *
* Defines how the algorithm is used for a training job. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TrainingSpecification implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon ECR registry path of the Docker image that contains the training algorithm. *
*/ private String trainingImage; /** ** An MD5 hash of the training algorithm that identifies the Docker image used for training. *
*/ private String trainingImageDigest; /** *
* A list of the HyperParameterSpecification
objects, that define the supported hyperparameters. This
* is required if the algorithm supports automatic model tuning.>
*
* A list of the instance types that this algorithm can use for training. *
*/ private java.util.List* Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than * one instance during training. *
*/ private Boolean supportsDistributedTraining; /** *
* A list of MetricDefinition
objects, which are used for parsing metrics generated by the algorithm.
*
* A list of ChannelSpecification
objects, which specify the input sources to be used by the algorithm.
*
* A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter * tuning job. *
*/ private java.util.List* The Amazon ECR registry path of the Docker image that contains the training algorithm. *
* * @param trainingImage * The Amazon ECR registry path of the Docker image that contains the training algorithm. */ public void setTrainingImage(String trainingImage) { this.trainingImage = trainingImage; } /** ** The Amazon ECR registry path of the Docker image that contains the training algorithm. *
* * @return The Amazon ECR registry path of the Docker image that contains the training algorithm. */ public String getTrainingImage() { return this.trainingImage; } /** ** The Amazon ECR registry path of the Docker image that contains the training algorithm. *
* * @param trainingImage * The Amazon ECR registry path of the Docker image that contains the training algorithm. * @return Returns a reference to this object so that method calls can be chained together. */ public TrainingSpecification withTrainingImage(String trainingImage) { setTrainingImage(trainingImage); return this; } /** ** An MD5 hash of the training algorithm that identifies the Docker image used for training. *
* * @param trainingImageDigest * An MD5 hash of the training algorithm that identifies the Docker image used for training. */ public void setTrainingImageDigest(String trainingImageDigest) { this.trainingImageDigest = trainingImageDigest; } /** ** An MD5 hash of the training algorithm that identifies the Docker image used for training. *
* * @return An MD5 hash of the training algorithm that identifies the Docker image used for training. */ public String getTrainingImageDigest() { return this.trainingImageDigest; } /** ** An MD5 hash of the training algorithm that identifies the Docker image used for training. *
* * @param trainingImageDigest * An MD5 hash of the training algorithm that identifies the Docker image used for training. * @return Returns a reference to this object so that method calls can be chained together. */ public TrainingSpecification withTrainingImageDigest(String trainingImageDigest) { setTrainingImageDigest(trainingImageDigest); return this; } /** *
* A list of the HyperParameterSpecification
objects, that define the supported hyperparameters. This
* is required if the algorithm supports automatic model tuning.>
*
HyperParameterSpecification
objects, that define the supported
* hyperparameters. This is required if the algorithm supports automatic model tuning.>
*/
public java.util.List
* A list of the HyperParameterSpecification
objects, that define the supported hyperparameters. This
* is required if the algorithm supports automatic model tuning.>
*
HyperParameterSpecification
objects, that define the supported hyperparameters.
* This is required if the algorithm supports automatic model tuning.>
*/
public void setSupportedHyperParameters(java.util.Collection
* A list of the HyperParameterSpecification
objects, that define the supported hyperparameters. This
* is required if the algorithm supports automatic model tuning.>
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedHyperParameters(java.util.Collection)} or * {@link #withSupportedHyperParameters(java.util.Collection)} if you want to override the existing values. *
* * @param supportedHyperParameters * A list of theHyperParameterSpecification
objects, that define the supported hyperparameters.
* This is required if the algorithm supports automatic model tuning.>
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withSupportedHyperParameters(HyperParameterSpecification... supportedHyperParameters) {
if (this.supportedHyperParameters == null) {
setSupportedHyperParameters(new java.util.ArrayList
* A list of the HyperParameterSpecification
objects, that define the supported hyperparameters. This
* is required if the algorithm supports automatic model tuning.>
*
HyperParameterSpecification
objects, that define the supported hyperparameters.
* This is required if the algorithm supports automatic model tuning.>
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withSupportedHyperParameters(java.util.Collection* A list of the instance types that this algorithm can use for training. *
* * @return A list of the instance types that this algorithm can use for training. * @see TrainingInstanceType */ public java.util.List* A list of the instance types that this algorithm can use for training. *
* * @param supportedTrainingInstanceTypes * A list of the instance types that this algorithm can use for training. * @see TrainingInstanceType */ public void setSupportedTrainingInstanceTypes(java.util.Collection* A list of the instance types that this algorithm can use for training. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedTrainingInstanceTypes(java.util.Collection)} or * {@link #withSupportedTrainingInstanceTypes(java.util.Collection)} if you want to override the existing values. *
* * @param supportedTrainingInstanceTypes * A list of the instance types that this algorithm can use for training. * @return Returns a reference to this object so that method calls can be chained together. * @see TrainingInstanceType */ public TrainingSpecification withSupportedTrainingInstanceTypes(String... supportedTrainingInstanceTypes) { if (this.supportedTrainingInstanceTypes == null) { setSupportedTrainingInstanceTypes(new java.util.ArrayList* A list of the instance types that this algorithm can use for training. *
* * @param supportedTrainingInstanceTypes * A list of the instance types that this algorithm can use for training. * @return Returns a reference to this object so that method calls can be chained together. * @see TrainingInstanceType */ public TrainingSpecification withSupportedTrainingInstanceTypes(java.util.Collection* A list of the instance types that this algorithm can use for training. *
* * @param supportedTrainingInstanceTypes * A list of the instance types that this algorithm can use for training. * @return Returns a reference to this object so that method calls can be chained together. * @see TrainingInstanceType */ public TrainingSpecification withSupportedTrainingInstanceTypes(TrainingInstanceType... supportedTrainingInstanceTypes) { java.util.ArrayList* Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than * one instance during training. *
* * @param supportsDistributedTraining * Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more * than one instance during training. */ public void setSupportsDistributedTraining(Boolean supportsDistributedTraining) { this.supportsDistributedTraining = supportsDistributedTraining; } /** ** Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than * one instance during training. *
* * @return Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more * than one instance during training. */ public Boolean getSupportsDistributedTraining() { return this.supportsDistributedTraining; } /** ** Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than * one instance during training. *
* * @param supportsDistributedTraining * Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more * than one instance during training. * @return Returns a reference to this object so that method calls can be chained together. */ public TrainingSpecification withSupportsDistributedTraining(Boolean supportsDistributedTraining) { setSupportsDistributedTraining(supportsDistributedTraining); return this; } /** ** Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than * one instance during training. *
* * @return Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more * than one instance during training. */ public Boolean isSupportsDistributedTraining() { return this.supportsDistributedTraining; } /** *
* A list of MetricDefinition
objects, which are used for parsing metrics generated by the algorithm.
*
MetricDefinition
objects, which are used for parsing metrics generated by the
* algorithm.
*/
public java.util.List
* A list of MetricDefinition
objects, which are used for parsing metrics generated by the algorithm.
*
MetricDefinition
objects, which are used for parsing metrics generated by the
* algorithm.
*/
public void setMetricDefinitions(java.util.Collection
* A list of MetricDefinition
objects, which are used for parsing metrics generated by the algorithm.
*
* 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 ofMetricDefinition
objects, which are used for parsing metrics generated by the
* algorithm.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withMetricDefinitions(MetricDefinition... metricDefinitions) {
if (this.metricDefinitions == null) {
setMetricDefinitions(new java.util.ArrayList
* A list of MetricDefinition
objects, which are used for parsing metrics generated by the algorithm.
*
MetricDefinition
objects, which are used for parsing metrics generated by the
* algorithm.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withMetricDefinitions(java.util.Collection
* A list of ChannelSpecification
objects, which specify the input sources to be used by the algorithm.
*
ChannelSpecification
objects, which specify the input sources to be used by the
* algorithm.
*/
public java.util.List
* A list of ChannelSpecification
objects, which specify the input sources to be used by the algorithm.
*
ChannelSpecification
objects, which specify the input sources to be used by the
* algorithm.
*/
public void setTrainingChannels(java.util.Collection
* A list of ChannelSpecification
objects, which specify the input sources to be used by the algorithm.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTrainingChannels(java.util.Collection)} or {@link #withTrainingChannels(java.util.Collection)} if you * want to override the existing values. *
* * @param trainingChannels * A list ofChannelSpecification
objects, which specify the input sources to be used by the
* algorithm.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withTrainingChannels(ChannelSpecification... trainingChannels) {
if (this.trainingChannels == null) {
setTrainingChannels(new java.util.ArrayList
* A list of ChannelSpecification
objects, which specify the input sources to be used by the algorithm.
*
ChannelSpecification
objects, which specify the input sources to be used by the
* algorithm.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrainingSpecification withTrainingChannels(java.util.Collection* A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter * tuning job. *
* * @return A list of the metrics that the algorithm emits that can be used as the objective metric in a * hyperparameter tuning job. */ public java.util.List* A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter * tuning job. *
* * @param supportedTuningJobObjectiveMetrics * A list of the metrics that the algorithm emits that can be used as the objective metric in a * hyperparameter tuning job. */ public void setSupportedTuningJobObjectiveMetrics(java.util.Collection* A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter * tuning job. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedTuningJobObjectiveMetrics(java.util.Collection)} or * {@link #withSupportedTuningJobObjectiveMetrics(java.util.Collection)} if you want to override the existing * values. *
* * @param supportedTuningJobObjectiveMetrics * A list of the metrics that the algorithm emits that can be used as the objective metric in a * hyperparameter tuning job. * @return Returns a reference to this object so that method calls can be chained together. */ public TrainingSpecification withSupportedTuningJobObjectiveMetrics(HyperParameterTuningJobObjective... supportedTuningJobObjectiveMetrics) { if (this.supportedTuningJobObjectiveMetrics == null) { setSupportedTuningJobObjectiveMetrics(new java.util.ArrayList* A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter * tuning job. *
* * @param supportedTuningJobObjectiveMetrics * A list of the metrics that the algorithm emits that can be used as the objective metric in a * hyperparameter tuning job. * @return Returns a reference to this object so that method calls can be chained together. */ public TrainingSpecification withSupportedTuningJobObjectiveMetrics( java.util.Collection