Skip to content

start_export_labels_task_run

start_export_labels_task_run(
    transform_id: HashString,
    output_s3_path: UriString,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> StartExportLabelsTaskRunResponse

Begins an asynchronous task to export all labeled data for a particular transform. This task is the only label-related API call that is not part of the typical active learning workflow. You typically use StartExportLabelsTaskRun when you want to work with all of your existing labels at the same time, such as when you want to remove or change labels that were previously submitted as truth. This API operation accepts the TransformId whose labels you want to export and an Amazon Simple Storage Service (Amazon S3) path to export the labels to. The operation returns a TaskRunId. You can check on the status of your task run by calling the GetMLTaskRun API.

Parameters:

  • transform_id (HashString) –

    The unique identifier of the machine learning transform.

  • output_s3_path (UriString) –

    The Amazon S3 path where you export the labels.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def start_export_labels_task_run(
    self,
    transform_id: "capo_glue.types.hash_string.HashString",
    output_s3_path: "capo_glue.types.uri_string.UriString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.start_export_labels_task_run_response.StartExportLabelsTaskRunResponse":
    """<p>Begins an asynchronous task to export all labeled data for a particular transform. This task is the only label-related API call that is not part of the typical active learning workflow. You typically use <code>StartExportLabelsTaskRun</code> when you want to work with all of your existing labels at the same time, such as when you want to remove or change labels that were previously submitted as truth. This API operation accepts the <code>TransformId</code> whose labels you want to export and an Amazon Simple Storage Service (Amazon S3) path to export the labels to. The operation returns a <code>TaskRunId</code>. You can check on the status of your task run by calling the <code>GetMLTaskRun</code> API.</p>

    Args:
        transform_id: <p>The unique identifier of the machine learning transform.</p>
        output_s3_path: <p>The Amazon S3 path where you export the labels.</p>

    Raises:
        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.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.start_export_labels_task_run_request.StartExportLabelsTaskRunRequest]",
    ) -> OperationResponse[
        "capo_glue.types.start_export_labels_task_run_response.StartExportLabelsTaskRunResponse"
    ]:
        import capo_glue._operations.aws_glue.start_export_labels_task_run

        output, http_response = (
            capo_glue._operations.aws_glue.start_export_labels_task_run.start_export_labels_task_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartExportLabelsTaskRun")
    )
    input_: capo_glue.types.start_export_labels_task_run_request.StartExportLabelsTaskRunRequest = {
        "transform_id": transform_id,
        "output_s3_path": output_s3_path,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output