Skip to content

ListCandidatesRequest

Source code in docs_src/capo_sagemaker/types/list_candidates_request.py
class ListCandidatesRequest(TypedDict, closed=True):
    leaderboard_arn: NotRequired["capo_sagemaker.types.leaderboard_arn.LeaderboardArn"]
    """<p>The Amazon Resource Name (ARN) of the leaderboard.</p>"""
    filters: NotRequired[
        "capo_sagemaker.types.leaderboard_candidate_filters.LeaderboardCandidateFilters"
    ]
    """<p>Filters that return only the candidates that match all of the filter values that you specify.</p>"""
    sort_by: NotRequired["capo_sagemaker.types.leaderboard_sort_by.LeaderboardSortBy"]
    """<p>The field to sort the candidates by. If you specify <code>METRIC</code>, you must also specify <code>SortMetric</code>. If you don't specify <code>SortBy</code>, the candidates are sorted by <code>CandidateId</code>.</p>"""
    sort_metric: NotRequired[
        "capo_sagemaker.types.leaderboard_sort_metric.LeaderboardSortMetric"
    ]
    """<p>The metric to sort the candidates by. Required when <code>SortBy</code> is <code>METRIC</code>. The response includes only the candidates whose most recent evaluation run reports this metric.</p>"""
    sort_order: NotRequired[
        "capo_sagemaker.types.leaderboard_sort_order.LeaderboardSortOrder"
    ]
    """<p>The sort order. The default is <code>DESCENDING</code>.</p>"""
    max_results: NotRequired[
        "capo_sagemaker.types.leaderboard_max_results.LeaderboardMaxResults"
    ]
    """<p>The maximum number of candidates to return in the response. The default is 20.</p>"""
    next_token: NotRequired["capo_sagemaker.types.next_token.NextToken"]
    """<p>If the result of the previous <code>ListCandidates</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of candidates, use the token in the next request. Use the same <code>Filters</code>, <code>SortBy</code>, <code>SortMetric</code>, and <code>SortOrder</code> as in the previous request. Otherwise, <code>ListCandidates</code> returns a <code>ValidationException</code> error.</p>"""

filters instance-attribute

filters: NotRequired[LeaderboardCandidateFilters]

Filters that return only the candidates that match all of the filter values that you specify.

leaderboard_arn instance-attribute

leaderboard_arn: NotRequired[LeaderboardArn]

The Amazon Resource Name (ARN) of the leaderboard.

max_results instance-attribute

max_results: NotRequired[LeaderboardMaxResults]

The maximum number of candidates to return in the response. The default is 20.

next_token instance-attribute

next_token: NotRequired[NextToken]

If the result of the previous ListCandidates request was truncated, the response includes a NextToken. To retrieve the next set of candidates, use the token in the next request. Use the same Filters, SortBy, SortMetric, and SortOrder as in the previous request. Otherwise, ListCandidates returns a ValidationException error.

sort_by instance-attribute

sort_by: NotRequired[LeaderboardSortBy]

The field to sort the candidates by. If you specify METRIC, you must also specify SortMetric. If you don't specify SortBy, the candidates are sorted by CandidateId.

sort_metric instance-attribute

sort_metric: NotRequired[LeaderboardSortMetric]

The metric to sort the candidates by. Required when SortBy is METRIC. The response includes only the candidates whose most recent evaluation run reports this metric.

sort_order instance-attribute

sort_order: NotRequired[LeaderboardSortOrder]

The sort order. The default is DESCENDING.