Pipelines — sagemaker 2.247.0 documentation (original) (raw)

ConditionStep

class sagemaker.workflow.condition_step.ConditionStep(name, depends_on=None, display_name=None, description=None, conditions=None, if_steps=None, else_steps=None)

Conditional step for pipelines to support conditional branching in the execution of steps.

Construct a ConditionStep for pipelines to support conditional branching.

If all the conditions in the condition list evaluate to True, the if_steps are marked as ready for execution. Otherwise, the else_steps are marked as ready for execution.

Parameters:

Deprecated since version sagemaker.workflow.condition_step.JsonGet.

Conditions

class sagemaker.workflow.conditions.ConditionTypeEnum(*args, value=, **kwargs)

Condition type enum.

class sagemaker.workflow.conditions.Condition(condition_type=_Nothing.NOTHING)

Abstract Condition entity.

Parameters:

condition_type (ConditionTypeEnum) –

condition_type

The type of condition.

Type:

ConditionTypeEnum

Method generated by attrs for class Condition.

class sagemaker.workflow.conditions.ConditionComparison(condition_type=_Nothing.NOTHING, left=None, right=None)

Generic comparison condition that can be used to derive specific condition comparisons.

Parameters:

left

The execution variable, parameter, property, step output or Python primitive value to use in the comparison.

Type:

Union[ConditionValueType, PrimitiveType]

right

The execution variable, parameter, property, step output or Python primitive value to compare to.

Type:

Union[ConditionValueType, PrimitiveType]

Method generated by attrs for class ConditionComparison.

class sagemaker.workflow.conditions.ConditionEquals(left, right)

A condition for equality comparisons.

Construct A condition for equality comparisons.

Parameters:

class sagemaker.workflow.conditions.ConditionGreaterThan(left, right)

A condition for greater than comparisons.

Construct an instance of ConditionGreaterThan for greater than comparisons.

Parameters:

class sagemaker.workflow.conditions.ConditionGreaterThanOrEqualTo(left, right)

A condition for greater than or equal to comparisons.

Construct of ConditionGreaterThanOrEqualTo for greater than or equal to comparisons.

Parameters:

class sagemaker.workflow.conditions.ConditionLessThan(left, right)

A condition for less than comparisons.

Construct an instance of ConditionLessThan for less than comparisons.

Parameters:

class sagemaker.workflow.conditions.ConditionLessThanOrEqualTo(left, right)

A condition for less than or equal to comparisons.

Construct ConditionLessThanOrEqualTo for less than or equal to comparisons.

Parameters:

class sagemaker.workflow.conditions.ConditionIn(value, in_values)

A condition to check membership.

Construct a ConditionIn condition to check membership.

Parameters:

class sagemaker.workflow.conditions.ConditionNot(expression)

A condition for negating another Condition.

Construct a ConditionNot condition for negating another Condition.

Parameters:

expression (Condition) –

expression

A Condition to take the negation of.

Type:

Condition

class sagemaker.workflow.conditions.ConditionOr(conditions=None)

A condition for taking the logical OR of a list of Condition instances.

Construct a ConditionOr condition.

Parameters:

conditions (List_[_Condition]) –

conditions

A list of Condition instances to logically OR.

Type:

List[Condition]

CheckJobConfig

class sagemaker.workflow.check_job_config.CheckJobConfig(role, instance_count=1, instance_type='ml.m5.xlarge', volume_size_in_gb=30, volume_kms_key=None, output_kms_key=None, max_runtime_in_seconds=None, base_job_name=None, sagemaker_session=None, env=None, tags=None, network_config=None)

Check job config for QualityCheckStep and ClarifyCheckStep.

Constructs a CheckJobConfig instance.

Parameters:

Entities

class sagemaker.workflow.entities.Entity

Base object for workflow entities.

Entities must implement the to_request method.

class sagemaker.workflow.entities.DefaultEnumMeta(cls, bases, classdict, *, boundary=None, _simple=False, **kwds)

An EnumMeta which defaults to the first value in the Enum list.

class sagemaker.workflow.entities.Expression

Base object for expressions.

Expressions must implement the expr property.

class sagemaker.workflow.entities.PipelineVariable

Base object for pipeline variables

PipelineVariable subclasses must implement the expr property. Its subclasses include:Parameter,Properties,Join,JsonGet,ExecutionVariable.StepOutput.

Execution Variables

class sagemaker.workflow.execution_variables.ExecutionVariable(name)

Pipeline execution variables for workflow.

Create a pipeline execution variable.

Parameters:

name (str) – The name of the execution variable.

class sagemaker.workflow.execution_variables.ExecutionVariables

Provide access to all available execution variables:

Functions

class sagemaker.workflow.functions.Join(on=_Nothing.NOTHING, values=_Nothing.NOTHING)

Join together properties.

Examples: Build a Amazon S3 Uri with bucket name parameter and pipeline execution Id and use it as training input:

bucket = ParameterString('bucket', default_value='my-bucket')

TrainingInput( s3_data=Join( on='/', values=['s3:/', bucket, ExecutionVariables.PIPELINE_EXECUTION_ID] ), content_type="text/csv")

Parameters:

values

The primitive type values, parameters, step properties, expressions to join.

Type:

List[Union[PrimitiveType, Parameter, Expression]]

on

The string to join the values on (Defaults to “”).

Type:

str

Method generated by attrs for class Join.

class sagemaker.workflow.functions.JsonGet(step_name=None, property_file=None, json_path=None, s3_uri=None, step=None)

Get JSON properties from PropertyFiles or S3 location.

Parameters:

step_name

The step name from which to get the property file.

Type:

str

property_file

Either a PropertyFile instance or the name of a property file.

Type:

Optional[Union[PropertyFile, str]]

json_path

The JSON path expression to the requested value.

Type:

str

s3_uri

The S3 location from which to fetch a Json file. The Json file is the output of a step defined with @step decorator.

Type:

Optional[sagemaker.workflow.functions.Join]

step

The upstream step object which the s3_uri is associated to.

Type:

Step

Method generated by attrs for class JsonGet.

Parameters

class sagemaker.workflow.parameters.ParameterTypeEnum(*args, value=, **kwargs)

Parameter type enum.

class sagemaker.workflow.parameters.Parameter(name=_Nothing.NOTHING, parameter_type=_Nothing.NOTHING, default_value=None)

Pipeline parameter for workflow.

Parameters:

name

The name of the parameter.

Type:

str

parameter_type

The type of the parameter.

Type:

ParameterTypeEnum

default_value

The default value of the parameter.

Type:

PrimitiveType

Method generated by attrs for class Parameter.

class sagemaker.workflow.parameters.ParameterString(name, default_value=None, enum_values=None)

String parameter for pipelines.

Create a pipeline string parameter.

Parameters:

class sagemaker.workflow.parameters.ParameterInteger(name, default_value=None)

Integer parameter for pipelines.

Create a pipeline integer parameter.

Parameters:

class sagemaker.workflow.parameters.ParameterFloat(name, default_value=None)

Float parameter for pipelines.

Create a pipeline float parameter.

Parameters:

sagemaker.workflow.parameters.ParameterBoolean

alias of functools.partial(<class ‘sagemaker.workflow.parameters.Parameter’>, parameter_type=<ParameterTypeEnum.BOOLEAN: ‘Boolean’>)

Pipeline

class sagemaker.workflow.pipeline.Pipeline(name='', parameters=None, pipeline_experiment_config=<sagemaker.workflow.pipeline_experiment_config.PipelineExperimentConfig object>, steps=None, sagemaker_session=None, pipeline_definition_config=<sagemaker.workflow.pipeline_definition_config.PipelineDefinitionConfig object>)

Pipeline for workflow.

Initialize a Pipeline

Parameters:

create(role_arn=None, description=None, tags=None, parallelism_config=None)

Creates a Pipeline in the Pipelines service.

Parameters:

Returns:

A response dict from the service.

Return type:

Dict[str, Any]

describe()

Describes a Pipeline in the Workflow service.

Returns:

Response dict from the service. See boto3 client documentation

Return type:

Dict[str, Any]

update(role_arn=None, description=None, parallelism_config=None)

Updates a Pipeline in the Workflow service.

Parameters:

Returns:

A response dict from the service.

Return type:

Dict[str, Any]

upsert(role_arn=None, description=None, tags=None, parallelism_config=None)

Creates a pipeline or updates it, if it already exists.

Parameters:

Returns:

response dict from service

Return type:

Dict[str, Any]

delete()

Deletes a Pipeline in the Workflow service.

Returns:

A response dict from the service.

Return type:

Dict[str, Any]

start(parameters=None, execution_display_name=None, execution_description=None, parallelism_config=None, selective_execution_config=None)

Starts a Pipeline execution in the Workflow service.

Parameters:

Returns:

A _PipelineExecution instance, if successful.

definition()

Converts a request structure to string representation for workflow service calls.

Returns:

A JSON formatted string of pipeline definition.

Return type:

str

list_executions(sort_by=None, sort_order=None, max_results=None, next_token=None)

Lists a pipeline’s executions.

Parameters:

Returns:

List of Pipeline Execution Summaries. See boto3 client list_pipeline_executionshttps://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.list_pipeline_executions

Return type:

Dict[str, Any]

build_parameters_from_execution(pipeline_execution_arn, parameter_value_overrides=None)

Gets the parameters from an execution, update with optional parameter value overrides.

Parameters:

Returns:

A parameter dict built from an execution and provided parameter value overrides.

Return type:

Dict[str, str | bool | int | float]

put_triggers(triggers, role_arn=None)

Attach triggers to a parent SageMaker Pipeline.

Parameters:

Returns:

Successfully created trigger Arn(s). Currently, the pythonSDK only supports

PipelineSchedule triggers, thus, this is a list of EventBridge Schedule Arn(s) that were created/upserted.

Return type:

List[str]

describe_trigger(trigger_name)

Describe Trigger for a parent SageMaker Pipeline.

Parameters:

trigger_name (str) – Trigger name to be described. Currently, this can only be an EventBridge schedule name.

Returns:

Trigger describe responses from EventBridge.

Return type:

Dict[str, str]

delete_triggers(trigger_names)

Delete Triggers for a parent SageMaker Pipeline if they exist.

Parameters:

trigger_names (List _[_str]) – List of trigger names to be deleted. Currently, these can only be EventBridge schedule names.

class sagemaker.workflow.pipeline._PipelineExecution(arn, sagemaker_session=_Nothing.NOTHING)

Internal class for encapsulating pipeline execution instances.

Parameters:

arn

The arn of the pipeline execution.

Type:

str

sagemaker_session

Session object which manages interactions with Amazon SageMaker APIs and any other AWS services needed. If not specified, the pipeline creates one using the default AWS configuration chain.

Type:

sagemaker.session.Session

Method generated by attrs for class _PipelineExecution.

stop()

Stops a pipeline execution.

describe()

Describes a pipeline execution.

Returns:

Information about the pipeline execution. Seeboto3 client describe_pipeline_execution.

list_steps()

Describes a pipeline execution’s steps.

Returns:

Information about the steps of the pipeline execution. Seeboto3 client list_pipeline_execution_steps.

list_parameters(max_results=None, next_token=None)

Gets a list of parameters for a pipeline execution.

Parameters:

Returns:

Information about the parameters of the pipeline execution. This function is also a wrapper for list_pipeline_parameters_for_execution.

wait(delay=30, max_attempts=60)

Waits for a pipeline execution.

Parameters:

result(step_name)

Retrieves the output of the provided step if it is a @step decorated function.

Parameters:

step_name (str) – The name of the pipeline step.

Returns:

The step output.

Raises:

Pipeline Context

class sagemaker.workflow.pipeline_context.PipelineSession(boto_session=None, sagemaker_client=None, default_bucket=None, settings=<sagemaker.session_settings.SessionSettings object>, sagemaker_config=None, default_bucket_prefix=None)

Managing interactions with SageMaker APIs and AWS services needed under Pipeline Context

This class inherits the SageMaker session, it provides convenient methods for manipulating entities and resources that Amazon SageMaker uses, such as training jobs, endpoints, and input datasets in S3. When composing SageMaker Model-Building Pipeline, PipelineSession is recommended over regular SageMaker Session

Initialize a PipelineSession.

Parameters:

property context

Hold contextual information useful to the session

init_model_step_arguments(model)

Create a _ModelStepArguments (if not exist) as pipeline context

Parameters:

model (Model or PipelineModel) – A sagemaker.model.Modelor sagemaker.pipeline.PipelineModel instance

class sagemaker.workflow.pipeline_context.LocalPipelineSession(boto_session=None, default_bucket=None, s3_endpoint_url=None, disable_local_code=False, default_bucket_prefix=None)

Managing a session that executes Sagemaker pipelines and jobs locally in a pipeline context.

This class inherits from the LocalSession and PipelineSession classes. When running Sagemaker pipelines locally, this class is preferred over LocalSession.

Initialize a LocalPipelineSession.

Parameters:

Pipeline Schedule

class sagemaker.workflow.triggers.PipelineSchedule(name=None, enabled=True, start_date=None, at=None, rate=None, cron=None)

Pipeline Schedule trigger type used to create EventBridge Schedules for SageMaker Pipelines.

To create a pipeline schedule, specify a single type using the at, rate, or cronparameters. For more information about EventBridge syntax, seeSchedule types on EventBridge Scheduler.

Parameters:

Method generated by attrs for class PipelineSchedule.

Parallelism Configuration

class sagemaker.workflow.parallelism_config.ParallelismConfiguration(max_parallel_execution_steps)

Parallelism config for SageMaker pipeline.

Create a ParallelismConfiguration

Parameters:

to_request()

Returns: the request structure.

Return type:

Dict[str, Any] | List[Dict[str, Any]]

Pipeline Definition Config

class sagemaker.workflow.pipeline_definition_config.PipelineDefinitionConfig(use_custom_job_prefix)

Pipeline Definition Configuration for SageMaker pipeline.

Create a PipelineDefinitionConfig.

Examples: Use a PipelineDefinitionConfig to turn on custom job prefixing:

PipelineDefinitionConfig(use_custom_job_prefix=True)

Parameters:

use_custom_job_prefix (bool) – A feature flag to toggle on/off custom name prefixing during pipeline orchestration.

Pipeline Experiment Config

class sagemaker.workflow.pipeline_experiment_config.PipelineExperimentConfig(experiment_name, trial_name)

Experiment config for SageMaker pipeline.

Create a PipelineExperimentConfig

Examples: Use pipeline name as the experiment name and pipeline execution id as the trial name:

PipelineExperimentConfig( ExecutionVariables.PIPELINE_NAME, ExecutionVariables.PIPELINE_EXECUTION_ID)

Use a customized experiment name and pipeline execution id as the trial name:

PipelineExperimentConfig( 'MyExperiment', ExecutionVariables.PIPELINE_EXECUTION_ID)

Parameters:

class sagemaker.workflow.pipeline_experiment_config.PipelineExperimentConfigProperty(name)

Reference to pipeline experiment config property.

Create a reference to pipeline experiment property.

Parameters:

name (str) – The name of the pipeline experiment config property.

Selective Execution Config

class sagemaker.workflow.selective_execution_config.SelectiveExecutionConfig(selected_steps, reference_latest_execution=True, source_pipeline_execution_arn=None)

The selective execution configuration, which defines a subset of pipeline steps to run in

another SageMaker pipeline run.

Create a SelectiveExecutionConfig.

Parameters:

Properties

class sagemaker.workflow.properties.PropertiesMeta(*args, **kwargs)

Load an internal shapes attribute from the botocore service model

for sagemaker and emr service.

Loads up the shapes from the botocore service model.

class sagemaker.workflow.properties.Properties(step_name, path=None, shape_name=None, shape_names=None, service_name='sagemaker', step=None)

Properties for use in workflow expressions.

Create a Properties instance representing the given shape.

Parameters:

class sagemaker.workflow.properties.PropertiesList(step_name, path, shape_name=None, service_name='sagemaker', step=None)

PropertiesList for use in workflow expressions.

Create a PropertiesList instance representing the given shape.

Parameters:

class sagemaker.workflow.properties.PropertyFile(name, output_name, path)

Provides a property file struct.

Parameters:

name

The name of the property file for reference with JsonGet functions.

Type:

str

output_name

The name of the processing job output channel.

Type:

str

path

The path to the file at the output channel location.

Type:

str

Method generated by attrs for class PropertyFile.

Step Collections

class sagemaker.workflow.step_collections.StepCollection(name, steps=_Nothing.NOTHING, depends_on=None)

A wrapper of pipeline steps for workflow.

Parameters:

name

The name of the StepCollection.

Type:

str

steps

A list of steps.

Type:

List[Step]

depends_on

The list of Step/StepCollection names or Step/StepCollection/StepOutputinstances that the current Step depends on.

Type:

List[Union[str, Step, StepCollection, StepOutput]]

Method generated by attrs for class StepCollection.

class sagemaker.workflow.step_collections.RegisterModel(name, content_types, response_types, inference_instances=None, transform_instances=None, estimator=None, model_data=None, depends_on=None, repack_model_step_retry_policies=None, register_model_step_retry_policies=None, model_package_group_name=None, model_metrics=None, approval_status=None, image_uri=None, compile_model_family=None, display_name=None, description=None, tags=None, model=None, drift_check_baselines=None, customer_metadata_properties=None, domain=None, sample_payload_url=None, task=None, framework=None, framework_version=None, nearest_model_name=None, data_input_configuration=None, skip_model_validation=None, source_uri=None, model_card=None, model_life_cycle=None, **kwargs)

Register Model step collection for workflow.

Construct steps _RepackModelStep and _RegisterModelStep based on the estimator.

Parameters:

class sagemaker.workflow.step_collections.EstimatorTransformer(name, estimator, model_data, model_inputs, instance_count, instance_type, transform_inputs, description=None, display_name=None, image_uri=None, predictor_cls=None, env=None, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, max_concurrent_transforms=None, max_payload=None, tags=None, volume_kms_key=None, depends_on=None, repack_model_step_retry_policies=None, model_step_retry_policies=None, transform_step_retry_policies=None, **kwargs)

Creates a Transformer step collection for workflow.

Construct steps required for a Transformer step collection:

An estimator-centric step collection. It models what happens in workflows when invoking the transform() method on an estimator instance: First, if custom model artifacts are required, a _RepackModelStep is included. Second, aCreateModelStep with the model data passed in from a training step or other training job output. Finally, a TransformerStep.

If repacking the model artifacts is not necessary, only the CreateModelStep and TransformerStep are in the step collection.

Parameters:

class sagemaker.workflow.model_step.ModelStep(name, step_args, depends_on=None, retry_policies=None, display_name=None, description=None, repack_model_step_settings=None)

ModelStep for SageMaker Pipelines Workflows.

Constructs a ModelStep.

Parameters:

class sagemaker.workflow.monitor_batch_transform_step.MonitorBatchTransformStep(name, transform_step_args, monitor_configuration, check_job_configuration, monitor_before_transform=False, fail_on_violation=True, supplied_baseline_statistics=None, supplied_baseline_constraints=None, display_name=None, description=None)

Creates a Transformer step with Quality or Clarify check step

Used to monitor the inputs and outputs of the batch transform job.

Construct a step collection of TransformStep, QualityCheckStep or ClarifyCheckStep

Parameters:

Steps

class sagemaker.workflow.steps.StepTypeEnum(value, names=, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Enum of Step types.

class sagemaker.workflow.steps.Step(name, display_name=None, description=None, step_type=None, depends_on=None)

Pipeline Step for SageMaker Pipelines Workflows.

Initialize a Step

Parameters:

class sagemaker.workflow.steps.TrainingStep(name, step_args=None, estimator=None, display_name=None, description=None, inputs=None, cache_config=None, depends_on=None, retry_policies=None)

TrainingStep for SageMaker Pipelines Workflows.

Construct a TrainingStep, given an EstimatorBase instance.

In addition to the EstimatorBase instance, the other arguments are those that are supplied to the fit method of the sagemaker.estimator.Estimator.

Parameters:

class sagemaker.workflow.steps.TuningStep(name, step_args=None, tuner=None, display_name=None, description=None, inputs=None, job_arguments=None, cache_config=None, depends_on=None, retry_policies=None)

TuningStep for SageMaker Pipelines Workflows.

Construct a TuningStep, given a HyperparameterTuner instance.

In addition to the HyperparameterTuner instance, the other arguments are those that are supplied to the fit method of the sagemaker.tuner.HyperparameterTuner.

Parameters:

sagemaker.workflow.steps.TuningStep.get_top_model_s3_uri(self, top_k, s3_bucket, prefix='')

Get the model artifact S3 URI from the top performing training jobs.

Parameters:

Return type:

Join

class sagemaker.workflow.steps.TransformStep(name, step_args=None, transformer=None, inputs=None, display_name=None, description=None, cache_config=None, depends_on=None, retry_policies=None)

TransformStep for SageMaker Pipelines Workflows.

Constructs a TransformStep, given a Transformer instance.

In addition to the Transformer instance, the other arguments are those that are supplied to the transform method of the sagemaker.transformer.Transformer.

Parameters:

class sagemaker.workflow.steps.ProcessingStep(name, step_args=None, processor=None, display_name=None, description=None, inputs=None, outputs=None, job_arguments=None, code=None, property_files=None, cache_config=None, depends_on=None, retry_policies=None, kms_key=None)

ProcessingStep for SageMaker Pipelines Workflows.

Construct a ProcessingStep, given a Processor instance.

In addition to the Processor instance, the other arguments are those that are supplied to the process method of the sagemaker.processing.Processor.

Parameters:

class sagemaker.workflow.notebook_job_step.NotebookJobStep(input_notebook, image_uri, kernel_name, name=None, display_name=None, description=None, notebook_job_name=None, role=None, s3_root_uri=None, parameters=None, environment_variables=None, initialization_script=None, s3_kms_key=None, instance_type='ml.m5.large', volume_size=30, volume_kms_key=None, encrypt_inter_container_traffic=True, security_group_ids=None, subnets=None, max_retry_attempts=1, max_runtime_in_seconds=172800, tags=None, additional_dependencies=None, retry_policies=None, depends_on=None)

NotebookJobStep for SageMaker Pipelines Workflows.

For more details about SageMaker Notebook Jobs, see SageMaker Notebook Jobs.

Constructs a NotebookJobStep.

Parameters:

class sagemaker.workflow.steps.CreateModelStep(name, step_args=None, model=None, inputs=None, depends_on=None, retry_policies=None, display_name=None, description=None)

CreateModelStep for SageMaker Pipelines Workflows.

Construct a CreateModelStep, given an sagemaker.model.Model instance.

In addition to the Model instance, the other arguments are those that are supplied to the _create_sagemaker_model method of the sagemaker.model.Model._create_sagemaker_model.

Parameters:

class sagemaker.workflow.callback_step.CallbackStep(name, sqs_queue_url, inputs, outputs, display_name=None, description=None, cache_config=None, depends_on=None)

Callback step for workflow.

Constructs a CallbackStep.

Parameters:

class sagemaker.workflow.steps.CacheConfig(enable_caching=False, expire_after=None)

Configuration class to enable caching in SageMaker Pipelines Workflows.

If caching is enabled, the pipeline attempts to find a previous execution of a Stepthat was called with the same arguments. Step caching only considers successful execution. If a successful previous execution is found, the pipeline propagates the values from the previous execution rather than recomputing the Step. When multiple successful executions exist within the timeout period, it uses the result for the most recent successful execution.

Parameters:

enable_caching (bool) –

enable_caching

To enable Step caching. Defaults to False.

Type:

bool

expire_after

If Step caching is enabled, a timeout also needs to defined. It defines how old a previous execution can be to be considered for reuse. Value should be an ISO 8601 duration string. Defaults to None.

Examples:

'p30d' # 30 days 'P4DT12H' # 4 days and 12 hours 'T12H' # 12 hours

Type:

str

Method generated by attrs for class CacheConfig.

class sagemaker.workflow.lambda_step.LambdaStep(name, lambda_func, display_name=None, description=None, inputs=None, outputs=None, cache_config=None, depends_on=None)

Lambda step for workflow.

Constructs a LambdaStep.

Parameters:

class sagemaker.workflow.quality_check_step.QualityCheckConfig(baseline_dataset, dataset_format, *, output_s3_uri=None, post_analytics_processor_script=None)

Quality Check Config.

Parameters:

baseline_dataset

The path to the baseline_dataset file. This can be a local path or an S3 uri string

Type:

str or PipelineVariable

dataset_format

The format of the baseline_dataset.

Type:

dict

output_s3_uri

Desired S3 destination of the constraint_violations and statistics json files (default: None). If not specified an auto generated path will be used: “s3://<default_session_bucket>/model-monitor/baselining/<job_name>/results”

Type:

str or PipelineVariable

post_analytics_processor_script

The path to the record post-analytics processor script (default: None). This can be a local path or an S3 uri string but CANNOT be any type of the PipelineVariable.

Type:

str

Method generated by attrs for class QualityCheckConfig.

class sagemaker.workflow.quality_check_step.QualityCheckStep(name, quality_check_config, check_job_config, skip_check=False, fail_on_violation=True, register_new_baseline=False, model_package_group_name=None, supplied_baseline_statistics=None, supplied_baseline_constraints=None, display_name=None, description=None, cache_config=None, depends_on=None)

QualityCheck step for workflow.

Constructs a QualityCheckStep.

To understand the skip_check, fail_on_violation, register_new_baseline,supplied_baseline_constraints and supplied_baseline_constraints parameters, check the following documentation:https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html

Parameters:

class sagemaker.workflow.clarify_check_step.ClarifyCheckConfig(data_config, *, kms_key=None, monitoring_analysis_config_uri=None)

Clarify Check Config

Parameters:

data_config

Config of the input/output data.

Type:

DataConfig

kms_key

The ARN of the KMS key that is used to encrypt the user code file (default: None). This field CANNOT be any type of the PipelineVariable.

Type:

str

monitoring_analysis_config_uri

(str): The uri of monitoring analysis config. This field does not take input. It will be generated once uploading the created analysis config file.

Type:

str

Method generated by attrs for class ClarifyCheckConfig.

class sagemaker.workflow.clarify_check_step.ClarifyCheckStep(name, clarify_check_config, check_job_config, skip_check=False, fail_on_violation=True, register_new_baseline=False, model_package_group_name=None, supplied_baseline_constraints=None, display_name=None, description=None, cache_config=None, depends_on=None)

ClarifyCheckStep step for workflow.

Constructs a ClarifyCheckStep.

To understand the skip_check, fail_on_violation, register_new_baselineand supplied_baseline_constraints parameters, check the following documentation:https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html

Parameters:

class sagemaker.workflow.fail_step.FailStep(name, error_message=None, display_name=None, description=None, depends_on=None)

FailStep for SageMaker Pipelines Workflows.

Constructs a FailStep.

Parameters:

class sagemaker.workflow.emr_step.EMRStepConfig(jar, args=None, main_class=None, properties=None)

Config for a Hadoop Jar step.

Create a definition for input data used by an EMR cluster(job flow) step.

See AWS documentation for more information about the StepConfig API parameters.

Parameters:

class sagemaker.workflow.emr_step.EMRStep(name, display_name, description, cluster_id, step_config, depends_on=None, cache_config=None, cluster_config=None, execution_role_arn=None)

EMR step for workflow.

Constructs an EMRStep.

Parameters:

class sagemaker.workflow.automl_step.AutoMLStep(name, step_args, display_name=None, description=None, cache_config=None, depends_on=None, retry_policies=None)

AutoMLStep for SageMaker Pipelines Workflows.

Construct a AutoMLStep, given a AutoML instance.

In addition to the AutoML instance, the other arguments are those that are supplied to the fit method of the sagemaker.automl.automl.AutoML.

Parameters:

@step decorator

function_step.step(*, name=None, display_name=None, description=None, retry_policies=None, dependencies=None, pre_execution_commands=None, pre_execution_script=None, environment_variables=None, image_uri=None, instance_count=1, instance_type=None, job_conda_env=None, job_name_prefix=None, keep_alive_period_in_seconds=0, max_retry_attempts=1, max_runtime_in_seconds=86400, role=None, security_group_ids=None, subnets=None, tags=None, volume_kms_key=None, volume_size=30, encrypt_inter_container_traffic=None, spark_config=None, use_spot_instances=False, max_wait_time_in_seconds=None)

Decorator for converting a python function to a pipeline step.

This decorator wraps the annotated code into a DelayedReturn object which can then be passed to a pipeline as a step. This creates a new pipeline that proceeds from the step of theDelayedReturn object.

If the value for a parameter is not set, the decorator first looks up the value from the SageMaker configuration file. If no value is specified in the configuration file or no configuration file is found, the decorator selects the default as specified in the following list. For more information, see Configuring and using defaults with the SageMaker Python SDK.

Parameters:

class sagemaker.workflow.function_step.DelayedReturn(function_step, reference_path=())

A proxy to the function returns of arbitrary type.

When a function decorated with @step is invoked, the return of that function is of type DelayedReturn. If the DelayedReturn object represents a Python collection, such as a tuple, list, or dict, you can reference the child items in the following ways:

Initializes a DelayedReturn object.

Parameters:

class sagemaker.workflow.step_outputs.StepOutput(step=None)

Base class representing @step decorator outputs.

Initializes a StepOutput object.

Parameters:

step (Step) – A sagemaker.workflow.steps.Step instance.

sagemaker.workflow.step_outputs.get_step(step_output)

Get the step associated with this output.

Parameters:

step_output (StepOutput) – A sagemaker.workflow.steps.StepOutput instance.

Returns:

A sagemaker.workflow.steps.Step instance.