Skip to content

update_ml_transform async

update_ml_transform(
    transform_id: HashString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    name: Optional[NameString] = None,
    description: Optional[DescriptionString] = None,
    parameters: Optional[TransformParameters] = None,
    role: Optional[RoleString] = 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,
) -> UpdateMLTransformResponse

Updates an existing machine learning transform. Call this operation to tune the algorithm parameters to achieve better results.

After calling this operation, you can call the StartMLEvaluationTaskRun operation to assess how well your new parameters achieved your goals (such as improving the quality of your machine learning transform, or making it more cost-effective).

Parameters:

  • transform_id (HashString) –

    A unique identifier that was generated when the transform was created.

  • name (Optional[NameString], default: None ) –

    The unique name that you gave the transform when you created it.

  • description (Optional[DescriptionString], default: None ) –

    A description of the transform. The default is an empty string.

  • parameters (Optional[TransformParameters], default: None ) –

    The configuration parameters that are specific to the transform type (algorithm) used. Conditionally dependent on the transform type.

  • role (Optional[RoleString], default: None ) –

    The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.

  • 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.

    When the WorkerType field is set to a value other than Standard, the MaxCapacity field 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 Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.

    • For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.

    • For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.

  • number_of_workers (Optional[NullableInteger], default: None ) –

    The number of workers of a defined workerType that are allocated when this task runs.

  • timeout (Optional[Timeout], default: None ) –

    The timeout for a 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 TIMEOUT status. 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.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def update_ml_transform(
    self,
    transform_id: "capo_glue.types.hash_string.HashString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    name: Optional["capo_glue.types.name_string.NameString"] = None,
    description: Optional[
        "capo_glue.types.description_string.DescriptionString"
    ] = None,
    parameters: Optional[
        "capo_glue.types.transform_parameters.TransformParameters"
    ] = None,
    role: Optional["capo_glue.types.role_string.RoleString"] = None,
    glue_version: Optional[
        "capo_glue.types.glue_version_string.GlueVersionString"
    ] = None,
    max_capacity: Optional["capo_glue.types.nullable_double.NullableDouble"] = None,
    worker_type: Optional["capo_glue.types.worker_type.WorkerType"] = None,
    number_of_workers: Optional[
        "capo_glue.types.nullable_integer.NullableInteger"
    ] = None,
    timeout: Optional["capo_glue.types.timeout.Timeout"] = None,
    max_retries: Optional[
        "capo_glue.types.nullable_integer.NullableInteger"
    ] = None,
) -> "capo_glue.types.update_ml_transform_response.UpdateMLTransformResponse":
    """<p>Updates an existing machine learning transform. Call this operation to tune the algorithm parameters to achieve better results.</p> <p>After calling this operation, you can call the <code>StartMLEvaluationTaskRun</code> operation to assess how well your new parameters achieved your goals (such as improving the quality of your machine learning transform, or making it more cost-effective).</p>

    Args:
        transform_id: <p>A unique identifier that was generated when the transform was created.</p>
        name: <p>The unique name that you gave the transform when you created it.</p>
        description: <p>A description of the transform. The default is an empty string.</p>
        parameters: <p>The configuration parameters that are specific to the transform type (algorithm) used. Conditionally dependent on the transform type.</p>
        role: <p>The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.</p>
        glue_version: <p>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 <a href="https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions">Glue Versions</a> in the developer guide.</p>
        max_capacity: <p>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 <a href="https://aws.amazon.com/glue/pricing/">Glue pricing page</a>. </p> <p>When the <code>WorkerType</code> field is set to a value other than <code>Standard</code>, the <code>MaxCapacity</code> field is set automatically and becomes read-only.</p>
        worker_type: <p>The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.</p> <ul> <li> <p>For the <code>Standard</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.</p> </li> <li> <p>For the <code>G.1X</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.</p> </li> <li> <p>For the <code>G.2X</code> worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.</p> </li> </ul>
        number_of_workers: <p>The number of workers of a defined <code>workerType</code> that are allocated when this task runs.</p>
        timeout: <p>The timeout for a 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 <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
        max_retries: <p>The maximum number of times to retry a task for this transform after a task run fails.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.update_ml_transform_request.UpdateMLTransformRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.update_ml_transform_response.UpdateMLTransformResponse"
    ]:
        import capo_glue._operations.aws_glue.update_ml_transform

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.update_ml_transform.async_update_ml_transform(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateMLTransform")
    )
    input_: capo_glue.types.update_ml_transform_request.UpdateMLTransformRequest = {
        "transform_id": transform_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if parameters is not None:
        input_["parameters"] = parameters
    if role is not None:
        input_["role"] = role
    if glue_version is not None:
        input_["glue_version"] = glue_version
    if max_capacity is not None:
        input_["max_capacity"] = max_capacity
    if worker_type is not None:
        input_["worker_type"] = worker_type
    if number_of_workers is not None:
        input_["number_of_workers"] = number_of_workers
    if timeout is not None:
        input_["timeout"] = timeout
    if max_retries is not None:
        input_["max_retries"] = max_retries

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output