/AWS1/CL_SGMTRAININGJOBDEFN¶
Defines the input needed to run a training job using the algorithm.
CONSTRUCTOR¶
IMPORTING¶
Required arguments:¶
iv_traininginputmode TYPE /AWS1/SGMTRAININGINPUTMODE /AWS1/SGMTRAININGINPUTMODE¶
The training input mode that the algorithm supports. For more information about input modes, see Algorithms.
Pipe mode
If an algorithm supports
Pipemode, Amazon SageMaker streams data directly from Amazon S3 to the container.File mode
If an algorithm supports
Filemode, SageMaker downloads the training data from S3 to the provisioned ML storage volume, and mounts the directory to the Docker volume for the training container.You must provision the ML storage volume with sufficient capacity to accommodate the data downloaded from S3. In addition to the training data, the ML storage volume also stores the output model. The algorithm container uses the ML storage volume to also store intermediate information, if any.
For distributed algorithms, training data is distributed uniformly. Your training duration is predictable if the input data objects sizes are approximately the same. SageMaker does not split the files any further for model training. If the object sizes are skewed, training won't be optimal as the data distribution is also skewed when one host in a training cluster is overloaded, thus becoming a bottleneck in training.
FastFile mode
If an algorithm supports
FastFilemode, SageMaker streams data directly from S3 to the container with no code changes, and provides file system access to the data. Users can author their training script to interact with these files as if they were stored on disk.
FastFilemode works best when the data is read sequentially. Augmented manifest files aren't supported. The startup time is lower when there are fewer files in the S3 bucket provided.
it_inputdataconfig TYPE /AWS1/CL_SGMCHANNEL=>TT_INPUTDATACONFIG TT_INPUTDATACONFIG¶
An array of
Channelobjects, each of which specifies an input source.
io_outputdataconfig TYPE REF TO /AWS1/CL_SGMOUTPUTDATACONFIG /AWS1/CL_SGMOUTPUTDATACONFIG¶
the path to the S3 bucket where you want to store model artifacts. SageMaker creates subfolders for the artifacts.
io_resourceconfig TYPE REF TO /AWS1/CL_SGMRESOURCECONFIG /AWS1/CL_SGMRESOURCECONFIG¶
The resources, including the ML compute instances and ML storage volumes, to use for model training.
io_stoppingcondition TYPE REF TO /AWS1/CL_SGMSTOPPINGCONDITION /AWS1/CL_SGMSTOPPINGCONDITION¶
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 SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts.
Optional arguments:¶
it_hyperparameters TYPE /AWS1/CL_SGMHYPERPARAMETERS_W=>TT_HYPERPARAMETERS TT_HYPERPARAMETERS¶
The hyperparameters used for the training job.
Queryable Attributes¶
TrainingInputMode¶
The training input mode that the algorithm supports. For more information about input modes, see Algorithms.
Pipe mode
If an algorithm supports
Pipemode, Amazon SageMaker streams data directly from Amazon S3 to the container.File mode
If an algorithm supports
Filemode, SageMaker downloads the training data from S3 to the provisioned ML storage volume, and mounts the directory to the Docker volume for the training container.You must provision the ML storage volume with sufficient capacity to accommodate the data downloaded from S3. In addition to the training data, the ML storage volume also stores the output model. The algorithm container uses the ML storage volume to also store intermediate information, if any.
For distributed algorithms, training data is distributed uniformly. Your training duration is predictable if the input data objects sizes are approximately the same. SageMaker does not split the files any further for model training. If the object sizes are skewed, training won't be optimal as the data distribution is also skewed when one host in a training cluster is overloaded, thus becoming a bottleneck in training.
FastFile mode
If an algorithm supports
FastFilemode, SageMaker streams data directly from S3 to the container with no code changes, and provides file system access to the data. Users can author their training script to interact with these files as if they were stored on disk.
FastFilemode works best when the data is read sequentially. Augmented manifest files aren't supported. The startup time is lower when there are fewer files in the S3 bucket provided.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_TRAININGINPUTMODE() |
Getter for TRAININGINPUTMODE, with configurable default |
ASK_TRAININGINPUTMODE() |
Getter for TRAININGINPUTMODE w/ exceptions if field has no v |
HAS_TRAININGINPUTMODE() |
Determine if TRAININGINPUTMODE has a value |
HyperParameters¶
The hyperparameters used for the training job.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_HYPERPARAMETERS() |
Getter for HYPERPARAMETERS, with configurable default |
ASK_HYPERPARAMETERS() |
Getter for HYPERPARAMETERS w/ exceptions if field has no val |
HAS_HYPERPARAMETERS() |
Determine if HYPERPARAMETERS has a value |
InputDataConfig¶
An array of
Channelobjects, each of which specifies an input source.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_INPUTDATACONFIG() |
Getter for INPUTDATACONFIG, with configurable default |
ASK_INPUTDATACONFIG() |
Getter for INPUTDATACONFIG w/ exceptions if field has no val |
HAS_INPUTDATACONFIG() |
Determine if INPUTDATACONFIG has a value |
OutputDataConfig¶
the path to the S3 bucket where you want to store model artifacts. SageMaker creates subfolders for the artifacts.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_OUTPUTDATACONFIG() |
Getter for OUTPUTDATACONFIG |
ResourceConfig¶
The resources, including the ML compute instances and ML storage volumes, to use for model training.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_RESOURCECONFIG() |
Getter for RESOURCECONFIG |
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 SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_STOPPINGCONDITION() |
Getter for STOPPINGCONDITION |