blob: 173c48e82b960f7a5d47e4e5f12854a679424e9f [file] [log] [blame]
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="datalabeling_v1beta1.html">Data Labeling API</a> . <a href="datalabeling_v1beta1.projects.html">projects</a> . <a href="datalabeling_v1beta1.projects.evaluations.html">evaluations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080081 <code><a href="#search">search(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070082<p class="firstline">Searches evaluations within a project.</p>
83<p class="toc_element">
84 <code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="close">close()</code>
89 <pre>Close httplib2 connections.</pre>
90</div>
91
92<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080093 <code class="details" id="search">search(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070094 <pre>Searches evaluations within a project.
95
96Args:
97 parent: string, Required. Evaluation search parent (project ID). Format: &quot;projects/ {project_id}&quot; (required)
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070098 pageSize: integer, Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
99 pageToken: string, Optional. A token identifying a page of results for the server to return. Typically obtained by the nextPageToken of the response to a previous search request. If you don&#x27;t specify this field, the API call requests the first page of the search.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800100 filter: string, Optional. To search evaluations, you can filter by the following: * evaluation_job.evaluation_job_id (the last part of EvaluationJob.name) * evaluation_job.model_id (the {model_name} portion of EvaluationJob.modelVersion) * evaluation_job.evaluation_job_run_time_start (Minimum threshold for the evaluationJobRunTime that created the evaluation) * evaluation_job.evaluation_job_run_time_end (Maximum threshold for the evaluationJobRunTime that created the evaluation) * evaluation_job.job_state (EvaluationJob.state) * annotation_spec.display_name (the Evaluation contains a metric for the annotation spec with this displayName) To filter by multiple critiera, use the `AND` operator or the `OR` operator. The following examples shows a string that filters by several critiera: &quot;evaluation_job.evaluation_job_id = {evaluation_job_id} AND evaluation_job.model_id = {model_name} AND evaluation_job.evaluation_job_run_time_start = {timestamp_1} AND evaluation_job.evaluation_job_run_time_end = {timestamp_2} AND annotation_spec.display_name = {display_name}&quot;
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700101 x__xgafv: string, V1 error format.
102 Allowed values
103 1 - v1 error format
104 2 - v2 error format
105
106Returns:
107 An object of the form:
108
109 { # Results of searching evaluations.
110 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
111 &quot;evaluations&quot;: [ # The list of evaluations matching the search.
112 { # Describes an evaluation between a machine learning model&#x27;s predictions and ground truth labels. Created when an EvaluationJob runs successfully.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700113 &quot;annotationType&quot;: &quot;A String&quot;, # Output only. Type of task that the model version being evaluated performs, as defined in the evaluationJobConfig.inputConfig.annotationType field of the evaluation job that created this evaluation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800114 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of an evaluation. The name has the following format: &quot;projects/{project_id}/datasets/{dataset_id}/evaluations/ {evaluation_id}&#x27;
115 &quot;evaluationJobRunTime&quot;: &quot;A String&quot;, # Output only. Timestamp for when the evaluation job that created this evaluation ran.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700116 &quot;config&quot;: { # Configuration details used for calculating evaluation metrics and creating an Evaluation. # Output only. Options used in the evaluation job that created this evaluation.
117 &quot;boundingBoxEvaluationOptions&quot;: { # Options regarding evaluation between bounding boxes. # Only specify this field if the related model performs image object detection (`IMAGE_BOUNDING_BOX_ANNOTATION`). Describes how to evaluate bounding boxes.
118 &quot;iouThreshold&quot;: 3.14, # Minimum [intersection-over-union (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) required for 2 bounding boxes to be considered a match. This must be a number between 0 and 1.
119 },
120 },
121 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp for when this evaluation was created.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800122 &quot;evaluationMetrics&quot;: { # Output only. Metrics comparing predictions to ground truth labels.
123 &quot;objectDetectionMetrics&quot;: { # Metrics calculated for an image object detection (bounding box) model.
124 &quot;prCurve&quot;: { # Precision-recall curve.
125 &quot;meanAveragePrecision&quot;: 3.14, # Mean average prcision of this curve.
126 &quot;annotationSpec&quot;: { # Container of information related to one possible annotation that can be used in a labeling task. For example, an image classification task where images are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and an AnnotationSpec for `cat`. # The annotation spec of the label for which the precision-recall curve calculated. If this field is empty, that means the precision-recall curve is an aggregate curve for all labels.
127 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description of the annotation specification. The description can be up to 10,000 characters long.
128 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the AnnotationSpec. Maximum of 64 characters.
129 &quot;index&quot;: 42, # Output only. This is the integer index of the AnnotationSpec. The index for the whole AnnotationSpecSet is sequential starting from 0. For example, an AnnotationSpecSet with classes `dog` and `cat`, might contain one AnnotationSpec with `{ display_name: &quot;dog&quot;, index: 0 }` and one AnnotationSpec with `{ display_name: &quot;cat&quot;, index: 1 }`. This is especially useful for model training as it encodes the string labels into numeric values.
130 },
131 &quot;areaUnderCurve&quot;: 3.14, # Area under the precision-recall curve. Not to be confused with area under a receiver operating characteristic (ROC) curve.
132 &quot;confidenceMetricsEntries&quot;: [ # Entries that make up the precision-recall graph. Each entry is a &quot;point&quot; on the graph drawn for a different `confidence_threshold`.
133 {
134 &quot;recallAt1&quot;: 3.14, # Recall value for entries with label that has highest score.
135 &quot;f1Score&quot;: 3.14, # Harmonic mean of recall and precision.
136 &quot;precision&quot;: 3.14, # Precision value.
137 &quot;precisionAt1&quot;: 3.14, # Precision value for entries with label that has highest score.
138 &quot;f1ScoreAt1&quot;: 3.14, # The harmonic mean of recall_at1 and precision_at1.
139 &quot;confidenceThreshold&quot;: 3.14, # Threshold used for this entry. For classification tasks, this is a classification threshold: a predicted label is categorized as positive or negative (in the context of this point on the PR curve) based on whether the label&#x27;s score meets this threshold. For image object detection (bounding box) tasks, this is the [intersection-over-union (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) threshold for the context of this point on the PR curve.
140 &quot;precisionAt5&quot;: 3.14, # Precision value for entries with label that has highest 5 scores.
141 &quot;f1ScoreAt5&quot;: 3.14, # The harmonic mean of recall_at5 and precision_at5.
142 &quot;recallAt5&quot;: 3.14, # Recall value for entries with label that has highest 5 scores.
143 &quot;recall&quot;: 3.14, # Recall value.
144 },
145 ],
146 },
147 },
148 &quot;classificationMetrics&quot;: { # Metrics calculated for a classification model.
149 &quot;prCurve&quot;: { # Precision-recall curve based on ground truth labels, predicted labels, and scores for the predicted labels.
150 &quot;meanAveragePrecision&quot;: 3.14, # Mean average prcision of this curve.
151 &quot;annotationSpec&quot;: { # Container of information related to one possible annotation that can be used in a labeling task. For example, an image classification task where images are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and an AnnotationSpec for `cat`. # The annotation spec of the label for which the precision-recall curve calculated. If this field is empty, that means the precision-recall curve is an aggregate curve for all labels.
152 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description of the annotation specification. The description can be up to 10,000 characters long.
153 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the AnnotationSpec. Maximum of 64 characters.
154 &quot;index&quot;: 42, # Output only. This is the integer index of the AnnotationSpec. The index for the whole AnnotationSpecSet is sequential starting from 0. For example, an AnnotationSpecSet with classes `dog` and `cat`, might contain one AnnotationSpec with `{ display_name: &quot;dog&quot;, index: 0 }` and one AnnotationSpec with `{ display_name: &quot;cat&quot;, index: 1 }`. This is especially useful for model training as it encodes the string labels into numeric values.
155 },
156 &quot;areaUnderCurve&quot;: 3.14, # Area under the precision-recall curve. Not to be confused with area under a receiver operating characteristic (ROC) curve.
157 &quot;confidenceMetricsEntries&quot;: [ # Entries that make up the precision-recall graph. Each entry is a &quot;point&quot; on the graph drawn for a different `confidence_threshold`.
158 {
159 &quot;recallAt1&quot;: 3.14, # Recall value for entries with label that has highest score.
160 &quot;f1Score&quot;: 3.14, # Harmonic mean of recall and precision.
161 &quot;precision&quot;: 3.14, # Precision value.
162 &quot;precisionAt1&quot;: 3.14, # Precision value for entries with label that has highest score.
163 &quot;f1ScoreAt1&quot;: 3.14, # The harmonic mean of recall_at1 and precision_at1.
164 &quot;confidenceThreshold&quot;: 3.14, # Threshold used for this entry. For classification tasks, this is a classification threshold: a predicted label is categorized as positive or negative (in the context of this point on the PR curve) based on whether the label&#x27;s score meets this threshold. For image object detection (bounding box) tasks, this is the [intersection-over-union (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) threshold for the context of this point on the PR curve.
165 &quot;precisionAt5&quot;: 3.14, # Precision value for entries with label that has highest 5 scores.
166 &quot;f1ScoreAt5&quot;: 3.14, # The harmonic mean of recall_at5 and precision_at5.
167 &quot;recallAt5&quot;: 3.14, # Recall value for entries with label that has highest 5 scores.
168 &quot;recall&quot;: 3.14, # Recall value.
169 },
170 ],
171 },
172 &quot;confusionMatrix&quot;: { # Confusion matrix of the model running the classification. Only applicable when the metrics entry aggregates multiple labels. Not applicable when the entry is for a single label. # Confusion matrix of predicted labels vs. ground truth labels.
173 &quot;row&quot;: [
174 { # A row in the confusion matrix. Each entry in this row has the same ground truth label.
175 &quot;entries&quot;: [ # A list of the confusion matrix entries. One entry for each possible predicted label.
176 {
177 &quot;annotationSpec&quot;: { # Container of information related to one possible annotation that can be used in a labeling task. For example, an image classification task where images are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and an AnnotationSpec for `cat`. # The annotation spec of a predicted label.
178 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description of the annotation specification. The description can be up to 10,000 characters long.
179 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the AnnotationSpec. Maximum of 64 characters.
180 &quot;index&quot;: 42, # Output only. This is the integer index of the AnnotationSpec. The index for the whole AnnotationSpecSet is sequential starting from 0. For example, an AnnotationSpecSet with classes `dog` and `cat`, might contain one AnnotationSpec with `{ display_name: &quot;dog&quot;, index: 0 }` and one AnnotationSpec with `{ display_name: &quot;cat&quot;, index: 1 }`. This is especially useful for model training as it encodes the string labels into numeric values.
181 },
182 &quot;itemCount&quot;: 42, # Number of items predicted to have this label. (The ground truth label for these items is the `Row.annotationSpec` of this entry&#x27;s parent.)
183 },
184 ],
185 &quot;annotationSpec&quot;: { # Container of information related to one possible annotation that can be used in a labeling task. For example, an image classification task where images are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and an AnnotationSpec for `cat`. # The annotation spec of the ground truth label for this row.
186 &quot;description&quot;: &quot;A String&quot;, # Optional. User-provided description of the annotation specification. The description can be up to 10,000 characters long.
187 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the AnnotationSpec. Maximum of 64 characters.
188 &quot;index&quot;: 42, # Output only. This is the integer index of the AnnotationSpec. The index for the whole AnnotationSpecSet is sequential starting from 0. For example, an AnnotationSpecSet with classes `dog` and `cat`, might contain one AnnotationSpec with `{ display_name: &quot;dog&quot;, index: 0 }` and one AnnotationSpec with `{ display_name: &quot;cat&quot;, index: 1 }`. This is especially useful for model training as it encodes the string labels into numeric values.
189 },
190 },
191 ],
192 },
193 },
194 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700195 &quot;evaluatedItemCount&quot;: &quot;A String&quot;, # Output only. The number of items in the ground truth dataset that were used for this evaluation. Only populated when the evaulation is for certain AnnotationTypes.
196 },
197 ],
198 }</pre>
199</div>
200
201<div class="method">
202 <code class="details" id="search_next">search_next(previous_request, previous_response)</code>
203 <pre>Retrieves the next page of results.
204
205Args:
206 previous_request: The request for the previous page. (required)
207 previous_response: The response from the request for the previous page. (required)
208
209Returns:
210 A request object that you can call &#x27;execute()&#x27; on to request the next
211 page. Returns None if there are no more items in the collection.
212 </pre>
213</div>
214
215</body></html>