/* * 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; /** *
* Specifies which training algorithm to use for training jobs that a hyperparameter tuning job launches and the metrics * to monitor. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class HyperParameterAlgorithmSpecification implements Serializable, Cloneable, StructuredPojo { /** *
* The registry path of the Docker image that contains the training algorithm. For information about Docker registry
* paths for built-in algorithms, see Algorithms
* Provided by Amazon SageMaker: Common Parameters. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information, see Using Your Own
* Algorithms with Amazon SageMaker.
*
* The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this
* parameter, do not specify a value for TrainingImage
.
*
* An array of MetricDefinition * objects that specify the metrics that the algorithm emits. *
*/ private java.util.List
* The registry path of the Docker image that contains the training algorithm. For information about Docker registry
* paths for built-in algorithms, see Algorithms
* Provided by Amazon SageMaker: Common Parameters. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information, see Using Your Own
* Algorithms with Amazon SageMaker.
*
registry/repository[:tag]
and registry/repository[@digest]
image path formats.
* For more information, see Using Your Own Algorithms with
* Amazon SageMaker.
*/
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 built-in algorithms, see Algorithms
* Provided by Amazon SageMaker: Common Parameters. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information, see Using Your Own
* Algorithms with Amazon SageMaker.
*
registry/repository[:tag]
and registry/repository[@digest]
image path formats.
* For more information, see Using Your Own Algorithms
* with Amazon SageMaker.
*/
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 built-in algorithms, see Algorithms
* Provided by Amazon SageMaker: Common Parameters. SageMaker supports both
* registry/repository[:tag]
and registry/repository[@digest]
image path formats. For more
* information, see Using Your Own
* Algorithms with Amazon SageMaker.
*
registry/repository[:tag]
and registry/repository[@digest]
image path formats.
* For more information, see Using Your Own Algorithms with
* Amazon SageMaker.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HyperParameterAlgorithmSpecification withTrainingImage(String trainingImage) {
setTrainingImage(trainingImage);
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 HyperParameterAlgorithmSpecification 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 HyperParameterAlgorithmSpecification withTrainingInputMode(TrainingInputMode trainingInputMode) {
this.trainingInputMode = trainingInputMode.toString();
return this;
}
/**
*
* The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this
* parameter, do not specify a value for TrainingImage
.
*
TrainingImage
.
*/
public void setAlgorithmName(String algorithmName) {
this.algorithmName = algorithmName;
}
/**
*
* The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this
* parameter, do not specify a value for TrainingImage
.
*
TrainingImage
.
*/
public String getAlgorithmName() {
return this.algorithmName;
}
/**
*
* The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this
* parameter, do not specify a value for TrainingImage
.
*
TrainingImage
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HyperParameterAlgorithmSpecification withAlgorithmName(String algorithmName) {
setAlgorithmName(algorithmName);
return this;
}
/**
* * An array of MetricDefinition * objects that specify the metrics that the algorithm emits. *
* * @return An array of * MetricDefinition objects that specify the metrics that the algorithm emits. */ public java.util.List* An array of MetricDefinition * objects that specify the metrics that the algorithm emits. *
* * @param metricDefinitions * An array of * MetricDefinition objects that specify the metrics that the algorithm emits. */ public void setMetricDefinitions(java.util.Collection* An array of MetricDefinition * objects that specify the metrics that the algorithm emits. *
** 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 * An array of * MetricDefinition objects that specify the metrics that the algorithm emits. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterAlgorithmSpecification withMetricDefinitions(MetricDefinition... metricDefinitions) { if (this.metricDefinitions == null) { setMetricDefinitions(new java.util.ArrayList* An array of MetricDefinition * objects that specify the metrics that the algorithm emits. *
* * @param metricDefinitions * An array of * MetricDefinition objects that specify the metrics that the algorithm emits. * @return Returns a reference to this object so that method calls can be chained together. */ public HyperParameterAlgorithmSpecification withMetricDefinitions(java.util.Collection