create_ml_transform
async
¶
create_ml_transform(
name: NameString,
input_record_tables: GlueTables,
parameters: TransformParameters,
role: RoleString,
*,
config_overrides: Optional[AsyncGlueClientConfig] = None,
description: Optional[DescriptionString] = None,
glue_version: Optional[GlueVersionString] = None,
max_capacity: Optional[NullableDouble] = None,
worker_type: Optional[WorkerType] = None,
number_of_workers: Optional[NullableInteger] = None,
timeout: Optional[Timeout] = None,
max_retries: Optional[NullableInteger] = None,
tags: Optional[TagsMap] = None,
transform_encryption: Optional[TransformEncryption] = None,
) -> CreateMLTransformResponse
Creates an Glue machine learning transform. This operation creates the transform and all the necessary parameters to train it.
Call this operation as the first step in the process of using a machine learning transform (such as the FindMatches transform) for deduplicating data. You can provide an optional Description, in addition to the parameters that you want to use for your algorithm.
You must also specify certain parameters for the tasks that Glue runs on your behalf as part of learning from your data and creating a high-quality machine learning transform. These parameters include Role, and optionally, AllocatedCapacity, Timeout, and MaxRetries. For more information, see Jobs.
Parameters:
-
name(NameString) –The unique name that you give the transform when you create it.
-
description(Optional[DescriptionString], default:None) –A description of the machine learning transform that is being defined. The default is an empty string.
-
input_record_tables(GlueTables) –A list of Glue table definitions used by the transform.
-
parameters(TransformParameters) –The algorithmic parameters that are specific to the transform type used. Conditionally dependent on the transform type.
-
role(RoleString) –The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both Glue service role permissions to Glue resources, and Amazon S3 permissions required by the transform.
-
This role needs Glue service role permissions to allow access to resources in Glue. See Attach a Policy to IAM Users That Access Glue.
-
This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.
-
-
glue_version(Optional[GlueVersionString], default:None) –This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see Glue Versions in the developer guide.
-
max_capacity(Optional[NullableDouble], default:None) –The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page.
MaxCapacityis a mutually exclusive option withNumberOfWorkersandWorkerType.-
If either
NumberOfWorkersorWorkerTypeis set, thenMaxCapacitycannot be set. -
If
MaxCapacityis set then neitherNumberOfWorkersorWorkerTypecan be set. -
If
WorkerTypeis set, thenNumberOfWorkersis required (and vice versa). -
MaxCapacityandNumberOfWorkersmust both be at least 1.
When the
WorkerTypefield is set to a value other thanStandard, theMaxCapacityfield is set automatically and becomes read-only.When the
WorkerTypefield is set to a value other thanStandard, theMaxCapacityfield is set automatically and becomes read-only. -
-
worker_type(Optional[WorkerType], default:None) –The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.
-
For the
Standardworker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. -
For the
G.1Xworker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker. -
For the
G.2Xworker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.
MaxCapacityis a mutually exclusive option withNumberOfWorkersandWorkerType.-
If either
NumberOfWorkersorWorkerTypeis set, thenMaxCapacitycannot be set. -
If
MaxCapacityis set then neitherNumberOfWorkersorWorkerTypecan be set. -
If
WorkerTypeis set, thenNumberOfWorkersis required (and vice versa). -
MaxCapacityandNumberOfWorkersmust both be at least 1.
-
-
number_of_workers(Optional[NullableInteger], default:None) –The number of workers of a defined
workerTypethat are allocated when this task runs.If
WorkerTypeis set, thenNumberOfWorkersis required (and vice versa). -
timeout(Optional[Timeout], default:None) –The timeout of the task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters
TIMEOUTstatus. The default is 2,880 minutes (48 hours). -
max_retries(Optional[NullableInteger], default:None) –The maximum number of times to retry a task for this transform after a task run fails.
-
tags(Optional[TagsMap], default:None) –The tags to use with this machine learning transform. You may use tags to limit access to the machine learning transform. For more information about tags in Glue, see Amazon Web Services Tags in Glue in the developer guide.
-
transform_encryption(Optional[TransformEncryption], default:None) –The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS.
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
AlreadyExistsException–A resource to be created or added already exists.
-
IdempotentParameterMismatchException–The same unique identifier was associated with two different records.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_glue/_services/async_glue.py
4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 | |