deploy_config_from_estimator: Export Airflow deploy config from a SageMaker estimator

View source: R/workflow_airflow.R

deploy_config_from_estimatorR Documentation

Export Airflow deploy config from a SageMaker estimator

Description

Export Airflow deploy config from a SageMaker estimator

Usage

deploy_config_from_estimator(
  estimator,
  task_id,
  task_type,
  initial_instance_count,
  instance_type,
  model_name = NULL,
  endpoint_name = NULL,
  tags = NULL,
  ...
)

Arguments

estimator

(sagemaker.model.EstimatorBase): The SageMaker estimator to export Airflow config from. It has to be an estimator associated with a training job.

task_id

(str): The task id of any airflow.contrib.operators.SageMakerTrainingOperator or airflow.contrib.operators.SageMakerTuningOperator that generates training jobs in the DAG. The endpoint config is built based on the training job generated in this operator.

task_type

(str): Whether the task is from SageMakerTrainingOperator or SageMakerTuningOperator. Values can be 'training', 'tuning' or None (which means training job is not from any task).

initial_instance_count

(int): Minimum number of EC2 instances to deploy to an endpoint for prediction.

instance_type

(str): Type of EC2 instance to deploy to an endpoint for prediction, for example, 'ml.c4.xlarge'.

model_name

(str): Name to use for creating an Amazon SageMaker model. If not specified, one will be generated.

endpoint_name

(str): Name to use for creating an Amazon SageMaker endpoint. If not specified, the name of the SageMaker model is used.

tags

(list[dict]): List of tags for labeling a training job. For more, see https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html.

...

: Passed to invocation of “create_model()“. Implementations may customize “create_model()“ to accept “**kwargs“ to customize model creation during deploy. For more, see the implementation docs.

Value

dict: Deploy config that can be directly used by SageMakerEndpointOperator in Airflow.


DyfanJones/sagemaker-r-workflow documentation built on April 3, 2022, 11:28 p.m.