From 72184a245575bc661bb7dabddc69e10304e85a06 Mon Sep 17 00:00:00 2001 From: Carolyn Nguyen <83104894+ca-nguyen@users.noreply.github.com> Date: Wed, 24 Nov 2021 17:10:21 -0800 Subject: [PATCH] Fix doc format and links (#182) --- doc/services.rst | 4 ++-- src/stepfunctions/steps/sagemaker.py | 21 +++++++++++---------- src/stepfunctions/steps/service.py | 12 ++++++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/doc/services.rst b/doc/services.rst index 8bbf5f5..2d1503b 100644 --- a/doc/services.rst +++ b/doc/services.rst @@ -70,11 +70,11 @@ Amazon EMR .. autoclass:: stepfunctions.steps.service.EmrModifyInstanceGroupByNameStep Amazon EventBridge ------------ +------------------ .. autoclass:: stepfunctions.steps.service.EventBridgePutEventsStep AWS Glue DataBrew --------------------- +----------------- .. autoclass:: stepfunctions.steps.service.GlueDataBrewStartJobRunStep Amazon SNS diff --git a/src/stepfunctions/steps/sagemaker.py b/src/stepfunctions/steps/sagemaker.py index f7e2e12..50c34b1 100644 --- a/src/stepfunctions/steps/sagemaker.py +++ b/src/stepfunctions/steps/sagemaker.py @@ -70,6 +70,7 @@ def __init__(self, state_id, estimator, job_name, data=None, hyperparameters=Non :class:`sagemaker.amazon.amazon_estimator.RecordSet` objects, where each instance is a different channel of training data. hyperparameters: Parameters used for training. + * (dict, optional) - Hyperparameters supplied will be merged with the Hyperparameters specified in the estimator. If there are duplicate entries, the value provided through this property will be used. (Default: Hyperparameters specified in the estimator.) * (Placeholder, optional) - The TrainingStep will use the hyperparameters specified by the Placeholder's value instead of the hyperparameters specified in the estimator. @@ -79,8 +80,8 @@ def __init__(self, state_id, estimator, job_name, data=None, hyperparameters=Non tags (list[dict] or Placeholder, optional): `List of tags `_ to associate with the resource. output_data_config_path (str or Placeholder, optional): S3 location for saving the training result (model artifacts and output files). If specified, it overrides the `output_path` property of `estimator`. - parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateTrainingJob`_. (Default: None) - You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders`_. + parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateTrainingJob `_. (Default: None) + You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders `_. """ self.estimator = estimator self.job_name = job_name @@ -224,8 +225,8 @@ def __init__(self, state_id, transformer, job_name, model_name, data, data_type= input_filter (str or Placeholder): A JSONPath to select a portion of the input to pass to the algorithm container for inference. If you omit the field, it gets the value ‘$’, representing the entire input. For CSV data, each row is taken as a JSON array, so only index-based JSONPaths can be applied, e.g. $[0], $[1:]. CSV data should follow the RFC format. See Supported JSONPath Operators for a table of supported JSONPath operators. For more information, see the SageMaker API documentation for CreateTransformJob. Some examples: “$[1:]”, “$.features” (default: None). output_filter (str or Placeholder): A JSONPath to select a portion of the joined/original output to return as the output. For more information, see the SageMaker API documentation for CreateTransformJob. Some examples: “$[1:]”, “$.prediction” (default: None). join_source (str or Placeholder): The source of data to be joined to the transform output. It can be set to ‘Input’ meaning the entire input record will be joined to the inference result. You can use OutputFilter to select the useful portion before uploading to S3. (default: None). Valid values: Input, None. - parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateTransformJob`_. - You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders`_. + parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateTransformJob `_. + You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders `_. """ if wait_for_completion: @@ -303,8 +304,8 @@ def __init__(self, state_id, model, model_name=None, instance_type=None, tags=No model_name (str or Placeholder, optional): Specify a model name, this is required for creating the model. We recommend to use :py:class:`~stepfunctions.inputs.ExecutionInput` placeholder collection to pass the value dynamically in each execution. instance_type (str, optional): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge'. tags (list[dict] or Placeholders, optional): `List of tags `_ to associate with the resource. - parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateModel`_. (Default: None) - You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders`_. + parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateModel `_. (Default: None) + You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders `_. """ if isinstance(model, FrameworkModel): model_parameters = model_config(model=model, instance_type=instance_type, role=model.role, image_uri=model.image_uri) @@ -466,8 +467,8 @@ def __init__(self, state_id, tuner, job_name, data, wait_for_completion=True, ta where each instance is a different channel of training data. wait_for_completion(bool, optional): Boolean value set to `True` if the Task state should wait for the tuning job to complete before proceeding to the next step in the workflow. Set to `False` if the Task state should submit the tuning job and proceed to the next step. (default: True) tags (list[dict] or Placeholder, optional): `List of tags `_ to associate with the resource. - parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateHyperParameterTuningJob`_. - You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders`_. + parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateHyperParameterTuningJob `_. + You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders `_. """ if wait_for_completion: @@ -534,8 +535,8 @@ def __init__(self, state_id, processor, job_name, inputs=None, outputs=None, exp The KmsKeyId is applied to all outputs. wait_for_completion (bool, optional): Boolean value set to `True` if the Task state should wait for the processing job to complete before proceeding to the next step in the workflow. Set to `False` if the Task state should submit the processing job and proceed to the next step. (default: True) tags (list[dict] or Placeholder, optional): `List of tags `_ to associate with the resource. - parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateProcessingJob`_. - You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders`_. + parameters(dict, optional): The value of this field is merged with other arguments to become the request payload for SageMaker `CreateProcessingJob `_. + You can use `parameters` to override the value provided by other arguments and specify any field's value dynamically using `Placeholders `_. """ if wait_for_completion: diff --git a/src/stepfunctions/steps/service.py b/src/stepfunctions/steps/service.py index 8f4992b..00ed01e 100644 --- a/src/stepfunctions/steps/service.py +++ b/src/stepfunctions/steps/service.py @@ -903,18 +903,18 @@ def __init__(self, state_id, **kwargs): class StepFunctionsStartExecutionStep(Task): """ - Creates a Task state that starts an execution of a state machine. See `Manage AWS Step Functions Executions as an Integrated Service `_ for more details. """ def __init__(self, state_id, integration_pattern=IntegrationPattern.WaitForCompletion, **kwargs): """ Args: 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. - integration_pattern (IntegrationPattern, optional): Service integration pattern used to call the integrated service. (default: WaitForCompletion) - Supported integration patterns: - WaitForCompletion: Wait for the state machine execution to complete before going to the next state. (See `Run A Job `_ for more details.) + * WaitForTaskToken: Wait for the state machine execution to return a task token before progressing to the next state (See `Wait for a Callback with the Task Token `_ for more details.) + * CallAndContinue: Call StartExecution and progress to the next state (See `Request Response `_ for more details.) timeout_seconds (int, optional): Positive integer specifying timeout for the state in seconds. If the state runs longer than the specified timeout, then the interpreter fails the state with a `States.Timeout` Error Name. (default: 60) timeout_seconds_path (str, optional): Path specifying the state's timeout value in seconds from the state input. When resolved, the path must select a field whose value is a positive integer. heartbeat_seconds (int, optional): Positive integer specifying heartbeat timeout for the state in seconds. This value should be lower than the one specified for `timeout_seconds`. If more time than the specified heartbeat elapses between heartbeats from the task, then the interpreter fails the state with a `States.Timeout` Error Name.