onSageMakerFullAccess managed policy permissions).If using a remote orchestrator: the remote environment in which the orchestrator runs needs to be able to implicitly authenticate to AWS and assume the IAM role specified when registering the SageMaker step operator. This is only possible if the orchestrator is also running in AWS and uses a form of implicit workload authentication like the IAM role of an EC2 instance. If this is not the case, you will need to use a service connector.

zenml step-operator register <NAME> \

--flavor=sagemaker \

--role=<SAGEMAKER_ROLE> \

--instance_type=<INSTANCE_TYPE> \

#   --experiment_name=<EXPERIMENT_NAME> # optionally specify an experiment to assign this run to

zenml stack register <STACK_NAME> -s <STEP_OPERATOR_NAME> ... --set

python run.py  # Authenticates with `default` profile in `~/.aws/config`

Once you added the step operator to your active stack, you can use it to execute individual steps of your pipeline by specifying it in the @step decorator as follows:

from zenml import step

@step(step_operator= <NAME>)

def trainer(...) -> ...:

"""Train a model."""

# This step will be executed in SageMaker.

ZenML will build a Docker image called <CONTAINER_REGISTRY_URI>/zenml:<PIPELINE_NAME> which includes your code and use it to run your steps in SageMaker. Check out this page if you want to learn more about how ZenML builds these images and how you can customize them.

Additional configuration

For additional configuration of the SageMaker step operator, you can pass SagemakerStepOperatorSettings when defining or running your pipeline. Check out the SDK docs for a full list of available attributes and this docs page for more information on how to specify settings.

For more information and a full list of configurable attributes of the SageMaker step operator, check out the SDK Docs .

Enabling CUDA for GPU-backed hardware