Skip to content

list_model_metadata async

list_model_metadata(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    search_expression: Optional[ModelMetadataSearchExpression] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListModelMetadataResponse

Lists the domain, framework, task, and model name of standard machine learning models found in common model zoos.

Parameters:

  • search_expression (Optional[ModelMetadataSearchExpression], default: None ) –

    One or more filters that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. Specify the Framework, FrameworkVersion, Domain or Task to filter supported. Filter names and values are case-sensitive.

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

    If the response to a previous ListModelMetadataResponse request was truncated, the response includes a NextToken. To retrieve the next set of model metadata, use the token in the next request.

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

    The maximum number of models to return in the response.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_model_metadata(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    search_expression: Optional[
        "capo_sagemaker.types.model_metadata_search_expression.ModelMetadataSearchExpression"
    ] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
) -> "capo_sagemaker.types.list_model_metadata_response.ListModelMetadataResponse":
    """<p>Lists the domain, framework, task, and model name of standard machine learning models found in common model zoos.</p>

    Args:
        search_expression: <p>One or more filters that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. Specify the Framework, FrameworkVersion, Domain or Task to filter supported. Filter names and values are case-sensitive.</p>
        next_token: <p>If the response to a previous <code>ListModelMetadataResponse</code> request was truncated, the response includes a NextToken. To retrieve the next set of model metadata, use the token in the next request.</p>
        max_results: <p>The maximum number of models to return in the response.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.list_model_metadata_request.ListModelMetadataRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_model_metadata_response.ListModelMetadataResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_model_metadata

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.list_model_metadata.async_list_model_metadata(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModelMetadata")
    )
    input_: capo_sagemaker.types.list_model_metadata_request.ListModelMetadataRequest = {}
    if search_expression is not None:
        input_["search_expression"] = search_expression
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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