list_candidates
async
¶
list_candidates(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
leaderboard_arn: Optional[LeaderboardArn] = None,
filters: Optional[LeaderboardCandidateFilters] = None,
sort_by: Optional[LeaderboardSortBy] = None,
sort_metric: Optional[LeaderboardSortMetric] = None,
sort_order: Optional[LeaderboardSortOrder] = None,
max_results: Optional[LeaderboardMaxResults] = None,
next_token: Optional[NextToken] = None,
) -> ListCandidatesResponse
Lists the candidates on a leaderboard. You can filter the candidates by dataset or by evaluation criteria, and sort them by creation time or by a metric.
For each evaluation criterion, ListCandidates returns the metrics from the candidate's most recent evaluation run. To get all of a candidate's evaluation metrics, use GetCandidate.
Changes that you make with AddCandidate or DeleteCandidate can take a short time to appear in ListCandidates results.
Parameters:
-
leaderboard_arn(Optional[LeaderboardArn], default:None) –The Amazon Resource Name (ARN) of the leaderboard.
-
filters(Optional[LeaderboardCandidateFilters], default:None) –Filters that return only the candidates that match all of the filter values that you specify.
-
sort_by(Optional[LeaderboardSortBy], default:None) –The field to sort the candidates by. If you specify
METRIC, you must also specifySortMetric. If you don't specifySortBy, the candidates are sorted byCandidateId. -
sort_metric(Optional[LeaderboardSortMetric], default:None) –The metric to sort the candidates by. Required when
SortByisMETRIC. The response includes only the candidates whose most recent evaluation run reports this metric. -
sort_order(Optional[LeaderboardSortOrder], default:None) –The sort order. The default is
DESCENDING. -
max_results(Optional[LeaderboardMaxResults], default:None) –The maximum number of candidates to return in the response. The default is 20.
-
next_token(Optional[NextToken], default:None) –If the result of the previous
ListCandidatesrequest was truncated, the response includes aNextToken. To retrieve the next set of candidates, use the token in the next request. Use the sameFilters,SortBy,SortMetric, andSortOrderas in the previous request. Otherwise,ListCandidatesreturns aValidationExceptionerror.
Raises:
-
ResourceNotFound–Resource being access is not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 | |