Class TrainingJob
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<TrainingJob.Builder,TrainingJob>
Contains information about a training job.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AlgorithmSpecificationInformation about the algorithm used for training, and algorithm metadata.final StringThe Amazon Resource Name (ARN) of the job.final IntegerThe billable time in seconds.static TrainingJob.Builderbuilder()final CheckpointConfigReturns the value of the CheckpointConfig property for this object.final InstantA timestamp that indicates when the training job was created.final DebugHookConfigReturns the value of the DebugHookConfig property for this object.final List<DebugRuleConfiguration> Information about the debug rule configuration.final List<DebugRuleEvaluationStatus> Information about the evaluation status of the rules for the training job.final BooleanTo encrypt all communications between ML compute instances in distributed training, chooseTrue.final BooleanWhen true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances.final BooleanIf theTrainingJobwas created with network isolation, the value is set totrue.The environment variables to set in the Docker container.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final ExperimentConfigReturns the value of the ExperimentConfig property for this object.final StringIf the training job failed, the reason it failed.final List<MetricData> A list of final metric values that are set when the training job completes.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the DebugRuleConfigurations property.final booleanFor responses, this returns true if the service returned a value for the DebugRuleEvaluationStatuses property.final booleanFor responses, this returns true if the service returned a value for the Environment property.final booleanFor responses, this returns true if the service returned a value for the FinalMetricDataList property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the HyperParameters property.final booleanFor responses, this returns true if the service returned a value for the InputDataConfig property.final booleanFor responses, this returns true if the service returned a value for the SecondaryStatusTransitions property.final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.Algorithm-specific parameters.An array ofChannelobjects that describes each data input channel.final StringThe Amazon Resource Name (ARN) of the labeling job.final InstantA timestamp that indicates when the status of the training job was last modified.final ModelArtifactsInformation about the Amazon S3 location that is configured for storing model artifacts.final OutputDataConfigThe S3 path where model artifacts that you configured when creating the job are stored.final ProfilerConfigReturns the value of the ProfilerConfig property for this object.final ResourceConfigResources, including ML compute instances and ML storage volumes, that are configured for model training.final RetryStrategyThe number of times to retry the job when the job fails due to anInternalServerError.final StringroleArn()The Amazon Web Services Identity and Access Management (IAM) role configured for the training job.final SecondaryStatusProvides detailed information about the state of the training job.final StringProvides detailed information about the state of the training job.final List<SecondaryStatusTransition> A history of all of the secondary statuses that the training job has transitioned through.static Class<? extends TrainingJob.Builder> final StoppingConditionSpecifies a limit to how long a model training job can run.tags()An array of key-value pairs.final TensorBoardOutputConfigReturns the value of the TensorBoardOutputConfig property for this object.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final InstantIndicates the time when the training job ends on training instances.final StringThe Amazon Resource Name (ARN) of the training job.final StringThe name of the training job.final TrainingJobStatusThe status of the training job.final StringThe status of the training job.final InstantIndicates the time when the training job starts on training instances.final IntegerThe training time in seconds.final StringThe Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job.final VpcConfigA VpcConfig object that specifies the VPC that this training job has access to.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
trainingJobName
The name of the training job.
- Returns:
- The name of the training job.
-
trainingJobArn
The Amazon Resource Name (ARN) of the training job.
- Returns:
- The Amazon Resource Name (ARN) of the training job.
-
tuningJobArn
The Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job.
- Returns:
- The Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job.
-
labelingJobArn
The Amazon Resource Name (ARN) of the labeling job.
- Returns:
- The Amazon Resource Name (ARN) of the labeling job.
-
autoMLJobArn
The Amazon Resource Name (ARN) of the job.
- Returns:
- The Amazon Resource Name (ARN) of the job.
-
modelArtifacts
Information about the Amazon S3 location that is configured for storing model artifacts.
- Returns:
- Information about the Amazon S3 location that is configured for storing model artifacts.
-
trainingJobStatus
The status of the training job.
Training job statuses are:
-
InProgress- The training is in progress. -
Completed- The training job has completed. -
Failed- The training job has failed. To see the reason for the failure, see theFailureReasonfield in the response to aDescribeTrainingJobResponsecall. -
Stopping- The training job is stopping. -
Stopped- The training job has stopped.
For more detailed information, see
SecondaryStatus.If the service returns an enum value that is not available in the current SDK version,
trainingJobStatuswill returnTrainingJobStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtrainingJobStatusAsString().- Returns:
- The status of the training job.
Training job statuses are:
-
InProgress- The training is in progress. -
Completed- The training job has completed. -
Failed- The training job has failed. To see the reason for the failure, see theFailureReasonfield in the response to aDescribeTrainingJobResponsecall. -
Stopping- The training job is stopping. -
Stopped- The training job has stopped.
For more detailed information, see
SecondaryStatus. -
- See Also:
-
-
trainingJobStatusAsString
The status of the training job.
Training job statuses are:
-
InProgress- The training is in progress. -
Completed- The training job has completed. -
Failed- The training job has failed. To see the reason for the failure, see theFailureReasonfield in the response to aDescribeTrainingJobResponsecall. -
Stopping- The training job is stopping. -
Stopped- The training job has stopped.
For more detailed information, see
SecondaryStatus.If the service returns an enum value that is not available in the current SDK version,
trainingJobStatuswill returnTrainingJobStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtrainingJobStatusAsString().- Returns:
- The status of the training job.
Training job statuses are:
-
InProgress- The training is in progress. -
Completed- The training job has completed. -
Failed- The training job has failed. To see the reason for the failure, see theFailureReasonfield in the response to aDescribeTrainingJobResponsecall. -
Stopping- The training job is stopping. -
Stopped- The training job has stopped.
For more detailed information, see
SecondaryStatus. -
- See Also:
-
-
secondaryStatus
Provides detailed information about the state of the training job. For detailed information about the secondary status of the training job, see
StatusMessageunder SecondaryStatusTransition.SageMaker provides primary statuses and secondary statuses that apply to each of them:
- InProgress
-
-
Starting- Starting the training job. -
Downloading- An optional stage for algorithms that supportFiletraining input mode. It indicates that data is being downloaded to the ML storage volumes. -
Training- Training is in progress. -
Uploading- Training is complete and the model artifacts are being uploaded to the S3 location.
-
- Completed
-
-
Completed- The training job has completed.
-
- Failed
-
-
Failed- The training job has failed. The reason for the failure is returned in theFailureReasonfield ofDescribeTrainingJobResponse.
-
- Stopped
-
-
MaxRuntimeExceeded- The job stopped because it exceeded the maximum allowed runtime. -
Stopped- The training job has stopped.
-
- Stopping
-
-
Stopping- Stopping the training job.
-
Valid values for
SecondaryStatusare subject to change.We no longer support the following secondary statuses:
-
LaunchingMLInstances -
PreparingTrainingStack -
DownloadingTrainingImage
If the service returns an enum value that is not available in the current SDK version,
secondaryStatuswill returnSecondaryStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsecondaryStatusAsString().- Returns:
- Provides detailed information about the state of the training job. For detailed information about the
secondary status of the training job, see
StatusMessageunder SecondaryStatusTransition.SageMaker provides primary statuses and secondary statuses that apply to each of them:
- InProgress
-
-
Starting- Starting the training job. -
Downloading- An optional stage for algorithms that supportFiletraining input mode. It indicates that data is being downloaded to the ML storage volumes. -
Training- Training is in progress. -
Uploading- Training is complete and the model artifacts are being uploaded to the S3 location.
-
- Completed
-
-
Completed- The training job has completed.
-
- Failed
-
-
Failed- The training job has failed. The reason for the failure is returned in theFailureReasonfield ofDescribeTrainingJobResponse.
-
- Stopped
-
-
MaxRuntimeExceeded- The job stopped because it exceeded the maximum allowed runtime. -
Stopped- The training job has stopped.
-
- Stopping
-
-
Stopping- Stopping the training job.
-
Valid values for
SecondaryStatusare subject to change.We no longer support the following secondary statuses:
-
LaunchingMLInstances -
PreparingTrainingStack -
DownloadingTrainingImage
- See Also:
-
secondaryStatusAsString
Provides detailed information about the state of the training job. For detailed information about the secondary status of the training job, see
StatusMessageunder SecondaryStatusTransition.SageMaker provides primary statuses and secondary statuses that apply to each of them:
- InProgress
-
-
Starting- Starting the training job. -
Downloading- An optional stage for algorithms that supportFiletraining input mode. It indicates that data is being downloaded to the ML storage volumes. -
Training- Training is in progress. -
Uploading- Training is complete and the model artifacts are being uploaded to the S3 location.
-
- Completed
-
-
Completed- The training job has completed.
-
- Failed
-
-
Failed- The training job has failed. The reason for the failure is returned in theFailureReasonfield ofDescribeTrainingJobResponse.
-
- Stopped
-
-
MaxRuntimeExceeded- The job stopped because it exceeded the maximum allowed runtime. -
Stopped- The training job has stopped.
-
- Stopping
-
-
Stopping- Stopping the training job.
-
Valid values for
SecondaryStatusare subject to change.We no longer support the following secondary statuses:
-
LaunchingMLInstances -
PreparingTrainingStack -
DownloadingTrainingImage
If the service returns an enum value that is not available in the current SDK version,
secondaryStatuswill returnSecondaryStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsecondaryStatusAsString().- Returns:
- Provides detailed information about the state of the training job. For detailed information about the
secondary status of the training job, see
StatusMessageunder SecondaryStatusTransition.SageMaker provides primary statuses and secondary statuses that apply to each of them:
- InProgress
-
-
Starting- Starting the training job. -
Downloading- An optional stage for algorithms that supportFiletraining input mode. It indicates that data is being downloaded to the ML storage volumes. -
Training- Training is in progress. -
Uploading- Training is complete and the model artifacts are being uploaded to the S3 location.
-
- Completed
-
-
Completed- The training job has completed.
-
- Failed
-
-
Failed- The training job has failed. The reason for the failure is returned in theFailureReasonfield ofDescribeTrainingJobResponse.
-
- Stopped
-
-
MaxRuntimeExceeded- The job stopped because it exceeded the maximum allowed runtime. -
Stopped- The training job has stopped.
-
- Stopping
-
-
Stopping- Stopping the training job.
-
Valid values for
SecondaryStatusare subject to change.We no longer support the following secondary statuses:
-
LaunchingMLInstances -
PreparingTrainingStack -
DownloadingTrainingImage
- See Also:
-
failureReason
If the training job failed, the reason it failed.
- Returns:
- If the training job failed, the reason it failed.
-
hasHyperParameters
public final boolean hasHyperParameters()For responses, this returns true if the service returned a value for the HyperParameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
hyperParameters
Algorithm-specific parameters.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasHyperParameters()method.- Returns:
- Algorithm-specific parameters.
-
algorithmSpecification
Information about the algorithm used for training, and algorithm metadata.
- Returns:
- Information about the algorithm used for training, and algorithm metadata.
-
roleArn
The Amazon Web Services Identity and Access Management (IAM) role configured for the training job.
- Returns:
- The Amazon Web Services Identity and Access Management (IAM) role configured for the training job.
-
hasInputDataConfig
public final boolean hasInputDataConfig()For responses, this returns true if the service returned a value for the InputDataConfig property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
inputDataConfig
An array of
Channelobjects that describes each data input channel.Your input must be in the same Amazon Web Services region as your training job.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInputDataConfig()method.- Returns:
- An array of
Channelobjects that describes each data input channel.Your input must be in the same Amazon Web Services region as your training job.
-
outputDataConfig
The S3 path where model artifacts that you configured when creating the job are stored. SageMaker creates subfolders for model artifacts.
- Returns:
- The S3 path where model artifacts that you configured when creating the job are stored. SageMaker creates subfolders for model artifacts.
-
resourceConfig
Resources, including ML compute instances and ML storage volumes, that are configured for model training.
- Returns:
- Resources, including ML compute instances and ML storage volumes, that are configured for model training.
-
vpcConfig
A VpcConfig object that specifies the VPC that this training job has access to. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud.
- Returns:
- A VpcConfig object that specifies the VPC that this training job has access to. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud.
-
stoppingCondition
Specifies a limit to how long a model training job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use this API to cap model training costs.
To stop a job, SageMaker sends the algorithm the
SIGTERMsignal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.- Returns:
- Specifies a limit to how long a model training job can run. It also specifies how long a managed Spot
training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use
this API to cap model training costs.
To stop a job, SageMaker sends the algorithm the
SIGTERMsignal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.
-
creationTime
A timestamp that indicates when the training job was created.
- Returns:
- A timestamp that indicates when the training job was created.
-
trainingStartTime
Indicates the time when the training job starts on training instances. You are billed for the time interval between this time and the value of
TrainingEndTime. The start time in CloudWatch Logs might be later than this time. The difference is due to the time it takes to download the training data and to the size of the training container.- Returns:
- Indicates the time when the training job starts on training instances. You are billed for the time
interval between this time and the value of
TrainingEndTime. The start time in CloudWatch Logs might be later than this time. The difference is due to the time it takes to download the training data and to the size of the training container.
-
trainingEndTime
Indicates the time when the training job ends on training instances. You are billed for the time interval between the value of
TrainingStartTimeand this time. For successful jobs and stopped jobs, this is the time after model artifacts are uploaded. For failed jobs, this is the time when SageMaker detects a job failure.- Returns:
- Indicates the time when the training job ends on training instances. You are billed for the time interval
between the value of
TrainingStartTimeand this time. For successful jobs and stopped jobs, this is the time after model artifacts are uploaded. For failed jobs, this is the time when SageMaker detects a job failure.
-
lastModifiedTime
A timestamp that indicates when the status of the training job was last modified.
- Returns:
- A timestamp that indicates when the status of the training job was last modified.
-
hasSecondaryStatusTransitions
public final boolean hasSecondaryStatusTransitions()For responses, this returns true if the service returned a value for the SecondaryStatusTransitions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
secondaryStatusTransitions
A history of all of the secondary statuses that the training job has transitioned through.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecondaryStatusTransitions()method.- Returns:
- A history of all of the secondary statuses that the training job has transitioned through.
-
hasFinalMetricDataList
public final boolean hasFinalMetricDataList()For responses, this returns true if the service returned a value for the FinalMetricDataList property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
finalMetricDataList
A list of final metric values that are set when the training job completes. Used only if the training job was configured to use metrics.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasFinalMetricDataList()method.- Returns:
- A list of final metric values that are set when the training job completes. Used only if the training job was configured to use metrics.
-
enableNetworkIsolation
If the
TrainingJobwas created with network isolation, the value is set totrue. If network isolation is enabled, nodes can't communicate beyond the VPC they run in.- Returns:
- If the
TrainingJobwas created with network isolation, the value is set totrue. If network isolation is enabled, nodes can't communicate beyond the VPC they run in.
-
enableInterContainerTrafficEncryption
To encrypt all communications between ML compute instances in distributed training, choose
True. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.- Returns:
- To encrypt all communications between ML compute instances in distributed training, choose
True. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.
-
enableManagedSpotTraining
When true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances. For more information, see Managed Spot Training.
- Returns:
- When true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances. For more information, see Managed Spot Training.
-
checkpointConfig
Returns the value of the CheckpointConfig property for this object.- Returns:
- The value of the CheckpointConfig property for this object.
-
trainingTimeInSeconds
The training time in seconds.
- Returns:
- The training time in seconds.
-
billableTimeInSeconds
The billable time in seconds.
- Returns:
- The billable time in seconds.
-
debugHookConfig
Returns the value of the DebugHookConfig property for this object.- Returns:
- The value of the DebugHookConfig property for this object.
-
experimentConfig
Returns the value of the ExperimentConfig property for this object.- Returns:
- The value of the ExperimentConfig property for this object.
-
hasDebugRuleConfigurations
public final boolean hasDebugRuleConfigurations()For responses, this returns true if the service returned a value for the DebugRuleConfigurations property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
debugRuleConfigurations
Information about the debug rule configuration.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasDebugRuleConfigurations()method.- Returns:
- Information about the debug rule configuration.
-
tensorBoardOutputConfig
Returns the value of the TensorBoardOutputConfig property for this object.- Returns:
- The value of the TensorBoardOutputConfig property for this object.
-
hasDebugRuleEvaluationStatuses
public final boolean hasDebugRuleEvaluationStatuses()For responses, this returns true if the service returned a value for the DebugRuleEvaluationStatuses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
debugRuleEvaluationStatuses
Information about the evaluation status of the rules for the training job.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasDebugRuleEvaluationStatuses()method.- Returns:
- Information about the evaluation status of the rules for the training job.
-
profilerConfig
Returns the value of the ProfilerConfig property for this object.- Returns:
- The value of the ProfilerConfig property for this object.
-
hasEnvironment
public final boolean hasEnvironment()For responses, this returns true if the service returned a value for the Environment property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
environment
The environment variables to set in the Docker container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEnvironment()method.- Returns:
- The environment variables to set in the Docker container.
-
retryStrategy
The number of times to retry the job when the job fails due to an
InternalServerError.- Returns:
- The number of times to retry the job when the job fails due to an
InternalServerError.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<TrainingJob.Builder,TrainingJob> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-