You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/overview.rst
+43-2
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ Using the SageMaker Python SDK
4
4
5
5
SageMaker Python SDK provides several high-level abstractions for working with Amazon SageMaker. These are:
6
6
7
+
- **ModelTrainer**: New interface encapsulating training on SageMaker.
7
8
- **Estimators**: Encapsulate training on SageMaker.
8
9
- **Models**: Encapsulate built ML models.
9
10
- **Predictors**: Provide real-time inference and transformation using Python data-types against a SageMaker endpoint.
@@ -24,8 +25,8 @@ Train a Model with the SageMaker Python SDK
24
25
To train a model by using the SageMaker Python SDK, you:
25
26
26
27
1. Prepare a training script
27
-
2. Create an estimator
28
-
3. Call the ``fit`` method of the estimator
28
+
2. Create a ModelTrainer or Estimator
29
+
3. Call the ``train`` method of the ModelTrainer or the ``fit`` method of the Estimator
29
30
30
31
After you train a model, you can save it, and then serve the model as an endpoint to get real-time inferences or get inferences for an entire dataset by using batch transform.
31
32
@@ -85,6 +86,46 @@ If you want to use, for example, boolean hyperparameters, you need to specify ``
85
86
For more on training environment variables, please visit `SageMaker Containers <https://github.com/aws/sagemaker-containers>`_.
86
87
87
88
89
+
Using ModelTrainer
90
+
==================
91
+
92
+
To use the ModelTrainer class, you need to provide a few essential parameters such as the training image URI and the source code configuration. The class allows you to spin up a SageMaker training job with minimal parameters, particularly by specifying the source code and training image.
93
+
94
+
For more information about class definitions see `ModelTrainer <https://sagemaker.readthedocs.io/en/stable/api/training/model_trainer.html>`_.
95
+
96
+
Example: Launching a Training Job with Custom Script
97
+
98
+
.. code:: python
99
+
100
+
from sagemaker.modules.train import ModelTrainer
101
+
from sagemaker.modules.configs import SourceCode, InputData
0 commit comments