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
feat: Adds support for Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig (#142)
Currently, it is not possible to specify the output path to TrainingStep. It needs to be defined at the Estimator level, which does not support placeholders. This change will make it possible to insert a placeholder output path from the TrainingStep definition and propagate it dynamically to the Estimator.
This change change also makes the TrainingStep data parameter compatible with placeholders.
There are other feature requests to make other TrainingStep arguments and ProcessingStep arguments compatible with placeholders. They will be addressed in a separate PR where the implementation could maybe be done at a higher level to avoid repetition.
Closes#98#97#80
Creates a Task State to execute a `SageMaker Training Job <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html>`_. The TrainingStep will also create a model by default, and the model shares the same name as the training job.
state_id (str): State name whose length **must be** less than or equal to 128 unicode characters. State names **must be** unique within the scope of the whole state machine.
54
54
estimator (sagemaker.estimator.EstimatorBase): The estimator for the training step. Can be a `BYO estimator, Framework estimator <https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html>`_ or `Amazon built-in algorithm estimator <https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html>`_.
55
55
job_name (str or Placeholder): Specify a training job name, this is required for the training job to run. We recommend to use :py:class:`~stepfunctions.inputs.ExecutionInput` placeholder collection to pass the value dynamically in each execution.
56
56
data: Information about the training data. Please refer to the ``fit()`` method of the associated estimator, as this can take any of the following forms:
57
57
58
-
* (str) - The S3 location where training data is saved.
58
+
* (str or Placeholder) - The S3 location where training data is saved.
59
59
* (dict[str, str] or dict[str, sagemaker.inputs.TrainingInput]) - If using multiple
60
60
channels for training data, you can specify a dict mapping channel names to
61
61
strings or :func:`~sagemaker.inputs.TrainingInput` objects.
experiment_config (dict, optional): Specify the experiment config for the training. (Default: None)
76
76
wait_for_completion (bool, optional): Boolean value set to `True` if the Task state should wait for the training job to complete before proceeding to the next step in the workflow. Set to `False` if the Task state should submit the training job and proceed to the next step. (default: True)
77
77
tags (list[dict], optional): `List to tags <https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html>`_ to associate with the resource.
78
+
output_data_config_path (str or Placeholder, optional): S3 location for saving the training result (model
79
+
artifacts and output files). If specified, it overrides the `output_path` property of `estimator`.
0 commit comments