Skip to content

get_ml_task_runs async

get_ml_task_runs(
    transform_id: HashString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[PageSize] = None,
    filter: Optional[TaskRunFilterCriteria] = None,
    sort: Optional[TaskRunSortCriteria] = None,
) -> GetMLTaskRunsResponse

Gets a list of runs for a machine learning transform. Machine learning task runs are asynchronous tasks that Glue runs on your behalf as part of various machine learning workflows. You can get a sortable, filterable list of machine learning task runs by calling GetMLTaskRuns with their parent transform's TransformID and other optional parameters as documented in this section.

This operation returns a list of historic runs and must be paginated.

Parameters:

  • transform_id (HashString) –

    The unique identifier of the machine learning transform.

  • next_token (Optional[PaginationToken], default: None ) –

    A token for pagination of the results. The default is empty.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of results to return.

  • filter (Optional[TaskRunFilterCriteria], default: None ) –

    The filter criteria, in the TaskRunFilterCriteria structure, for the task run.

  • sort (Optional[TaskRunSortCriteria], default: None ) –

    The sorting criteria, in the TaskRunSortCriteria structure, for the task run.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def get_ml_task_runs(
    self,
    transform_id: "capo_glue.types.hash_string.HashString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    next_token: Optional["capo_glue.types.pagination_token.PaginationToken"] = None,
    max_results: Optional["capo_glue.types.page_size.PageSize"] = None,
    filter: Optional[
        "capo_glue.types.task_run_filter_criteria.TaskRunFilterCriteria"
    ] = None,
    sort: Optional[
        "capo_glue.types.task_run_sort_criteria.TaskRunSortCriteria"
    ] = None,
) -> "capo_glue.types.get_ml_task_runs_response.GetMLTaskRunsResponse":
    """<p>Gets a list of runs for a machine learning transform. Machine learning task runs are asynchronous tasks that Glue runs on your behalf as part of various machine learning workflows. You can get a sortable, filterable list of machine learning task runs by calling <code>GetMLTaskRuns</code> with their parent transform's <code>TransformID</code> and other optional parameters as documented in this section.</p> <p>This operation returns a list of historic runs and must be paginated.</p>

    Args:
        transform_id: <p>The unique identifier of the machine learning transform.</p>
        next_token: <p>A token for pagination of the results. The default is empty.</p>
        max_results: <p>The maximum number of results to return. </p>
        filter: <p>The filter criteria, in the <code>TaskRunFilterCriteria</code> structure, for the task run.</p>
        sort: <p>The sorting criteria, in the <code>TaskRunSortCriteria</code> structure, for the task run.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.get_ml_task_runs_request.GetMLTaskRunsRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.get_ml_task_runs_response.GetMLTaskRunsResponse"
    ]:
        import capo_glue._operations.aws_glue.get_ml_task_runs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetMLTaskRuns")
    )
    input_: capo_glue.types.get_ml_task_runs_request.GetMLTaskRunsRequest = {
        "transform_id": transform_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if filter is not None:
        input_["filter"] = filter
    if sort is not None:
        input_["sort"] = sort

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