tonita.eval
#
- tonita.eval.submit(search_requests, notification_email_addresses, corpus_id=None, api_key=None)#
Submits a request for evaluation of a batch of search requests.
- Parameters:
search_requests (List[SearchRequest]) – A list of SearchRequest`s to evaluate. See docstring for `SearchRequest.
notification_email_addresses (List[str]) – A list of email addresses to which notifications about the progress of this evaluation should be sent.
corpus_id (Optional[str]) – The ID of the corpus to search within for this batch of search requests. If this argument is
None
, then the value oftonita.corpus_id
will be used.api_key (Optional[str]) – An API key. If this argument is
None
, then the value oftonita.api_key
will be used.
- Returns:
See docstring for SubmitEvalResponse.
- Return type:
- Raises:
TonitaBadRequestError – The request is malformed; see error message for specifics.
TonitaInternalServerError – A server-side error occurred.
TonitaUnauthorizedError – The API key is missing or invalid.
- tonita.eval.retrieve(eval_id, corpus_id=None, api_key=None)#
Retrieves the status of an evaluation, as well as results if available.
- Parameters:
eval_id (str) – The ID of an evaluation whose status to check or results to retrieve.
corpus_id (Optional[str]) – The ID of the corpus that was used when submitting the evaluation. If this argument is
None
, then the value oftonita.corpus_id
will be used.api_key (Optional[str]) – An API key corresponding to the submitted evaluation. If this argument is
None
, then the value oftonita.api_key
will be used.
- Returns:
See docstring for RetrieveEvalResponse.
- Return type:
- Raises:
TonitaBadRequestError – The request is malformed; see error message for specifics.
TonitaInternalServerError – A server-side error occurred.
TonitaUnauthorizedError – The API key is missing or invalid.