Skip to content

start_ml_labeling_set_generation_task_run async

start_ml_labeling_set_generation_task_run(
    transform_id: HashString,
    output_s3_path: UriString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> StartMLLabelingSetGenerationTaskRunResponse

Starts the active learning workflow for your machine learning transform to improve the transform's quality by generating label sets and adding labels.

When the StartMLLabelingSetGenerationTaskRun finishes, Glue will have generated a "labeling set" or a set of questions for humans to answer.

In the case of the FindMatches transform, these questions are of the form, “What is the correct way to group these rows together into groups composed entirely of matching records?”

After the labeling process is finished, you can upload your labels with a call to StartImportLabelsTaskRun. After StartImportLabelsTaskRun finishes, all future runs of the machine learning transform will use the new and improved labels and perform a higher-quality transformation.

Note: The role used to write the generated labeling set to the OutputS3Path is the role associated with the Machine Learning Transform, specified in the CreateMLTransform API.

Parameters:

  • transform_id (HashString) –

    The unique identifier of the machine learning transform.

  • output_s3_path (UriString) –

    The Amazon Simple Storage Service (Amazon S3) path where you generate the labeling set.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def start_ml_labeling_set_generation_task_run(
    self,
    transform_id: "capo_glue.types.hash_string.HashString",
    output_s3_path: "capo_glue.types.uri_string.UriString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.start_ml_labeling_set_generation_task_run_response.StartMLLabelingSetGenerationTaskRunResponse":
    """<p>Starts the active learning workflow for your machine learning transform to improve the transform's quality by generating label sets and adding labels.</p> <p>When the <code>StartMLLabelingSetGenerationTaskRun</code> finishes, Glue will have generated a "labeling set" or a set of questions for humans to answer.</p> <p>In the case of the <code>FindMatches</code> transform, these questions are of the form, “What is the correct way to group these rows together into groups composed entirely of matching records?” </p> <p>After the labeling process is finished, you can upload your labels with a call to <code>StartImportLabelsTaskRun</code>. After <code>StartImportLabelsTaskRun</code> finishes, all future runs of the machine learning transform will use the new and improved labels and perform a higher-quality transformation.</p> <p>Note: The role used to write the generated labeling set to the <code>OutputS3Path</code> is the role associated with the Machine Learning Transform, specified in the <code>CreateMLTransform</code> API.</p>

    Args:
        transform_id: <p>The unique identifier of the machine learning transform.</p>
        output_s3_path: <p>The Amazon Simple Storage Service (Amazon S3) path where you generate the labeling set.</p>

    Raises:
        capo_glue.errors.concurrent_runs_exceeded_exception.ConcurrentRunsExceededException: <p>Too many jobs are being run concurrently.</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.start_ml_labeling_set_generation_task_run_request.StartMLLabelingSetGenerationTaskRunRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.start_ml_labeling_set_generation_task_run_response.StartMLLabelingSetGenerationTaskRunResponse"
    ]:
        import capo_glue._operations.aws_glue.start_ml_labeling_set_generation_task_run

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartMLLabelingSetGenerationTaskRun")
    )
    input_: capo_glue.types.start_ml_labeling_set_generation_task_run_request.StartMLLabelingSetGenerationTaskRunRequest = {
        "transform_id": transform_id,
        "output_s3_path": output_s3_path,
    }

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