io.proto 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.automl.v1beta1;
  16. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
  17. option java_multiple_files = true;
  18. option java_package = "com.google.cloud.automl.v1beta1";
  19. option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
  20. option ruby_package = "Google::Cloud::AutoML::V1beta1";
  21. // Input configuration for ImportData Action.
  22. //
  23. // The format of input depends on dataset_metadata the Dataset into which
  24. // the import is happening has. As input source the
  25. // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
  26. // is expected, unless specified otherwise. Additionally any input .CSV file
  27. // by itself must be 100MB or smaller, unless specified otherwise.
  28. // If an "example" file (that is, image, video etc.) with identical content
  29. // (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
  30. // its label, bounding boxes etc. are appended. The same file should be always
  31. // provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
  32. // these values are nondeterministically selected from the given ones.
  33. //
  34. // The formats are represented in EBNF with commas being literal and with
  35. // non-terminal symbols defined near the end of this comment. The formats are:
  36. //
  37. // * For Image Classification:
  38. // CSV file(s) with each line in format:
  39. // ML_USE,GCS_FILE_PATH,LABEL,LABEL,...
  40. // GCS_FILE_PATH leads to image of up to 30MB in size. Supported
  41. // extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO
  42. // For MULTICLASS classification type, at most one LABEL is allowed
  43. // per image. If an image has not yet been labeled, then it should be
  44. // mentioned just once with no LABEL.
  45. // Some sample rows:
  46. // TRAIN,gs://folder/image1.jpg,daisy
  47. // TEST,gs://folder/image2.jpg,dandelion,tulip,rose
  48. // UNASSIGNED,gs://folder/image3.jpg,daisy
  49. // UNASSIGNED,gs://folder/image4.jpg
  50. //
  51. // * For Image Object Detection:
  52. // CSV file(s) with each line in format:
  53. // ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,)
  54. // GCS_FILE_PATH leads to image of up to 30MB in size. Supported
  55. // extensions: .JPEG, .GIF, .PNG.
  56. // Each image is assumed to be exhaustively labeled. The minimum
  57. // allowed BOUNDING_BOX edge length is 0.01, and no more than 500
  58. // BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined
  59. // per line). If an image has not yet been labeled, then it should be
  60. // mentioned just once with no LABEL and the ",,,,,,," in place of the
  61. // BOUNDING_BOX. For images which are known to not contain any
  62. // bounding boxes, they should be labelled explictly as
  63. // "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the
  64. // BOUNDING_BOX.
  65. // Sample rows:
  66. // TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
  67. // TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
  68. // UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
  69. // TEST,gs://folder/im3.png,,,,,,,,,
  70. // TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,,
  71. //
  72. // * For Video Classification:
  73. // CSV file(s) with each line in format:
  74. // ML_USE,GCS_FILE_PATH
  75. // where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
  76. // should lead to another .csv file which describes examples that have
  77. // given ML_USE, using the following row format:
  78. // GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,)
  79. // Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
  80. // to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
  81. // TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
  82. // length of the video, and end has to be after the start. Any segment
  83. // of a video which has one or more labels on it, is considered a
  84. // hard negative for all other labels. Any segment with no labels on
  85. // it is considered to be unknown. If a whole video is unknown, then
  86. // it shuold be mentioned just once with ",," in place of LABEL,
  87. // TIME_SEGMENT_START,TIME_SEGMENT_END.
  88. // Sample top level CSV file:
  89. // TRAIN,gs://folder/train_videos.csv
  90. // TEST,gs://folder/test_videos.csv
  91. // UNASSIGNED,gs://folder/other_videos.csv
  92. // Sample rows of a CSV file for a particular ML_USE:
  93. // gs://folder/video1.avi,car,120,180.000021
  94. // gs://folder/video1.avi,bike,150,180.000021
  95. // gs://folder/vid2.avi,car,0,60.5
  96. // gs://folder/vid3.avi,,,
  97. //
  98. // * For Video Object Tracking:
  99. // CSV file(s) with each line in format:
  100. // ML_USE,GCS_FILE_PATH
  101. // where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
  102. // should lead to another .csv file which describes examples that have
  103. // given ML_USE, using one of the following row format:
  104. // GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX
  105. // or
  106. // GCS_FILE_PATH,,,,,,,,,,
  107. // Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
  108. // to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
  109. // Providing INSTANCE_IDs can help to obtain a better model. When
  110. // a specific labeled entity leaves the video frame, and shows up
  111. // afterwards it is not required, albeit preferable, that the same
  112. // INSTANCE_ID is given to it.
  113. // TIMESTAMP must be within the length of the video, the
  114. // BOUNDING_BOX is assumed to be drawn on the closest video's frame
  115. // to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected
  116. // to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per
  117. // frame are allowed. If a whole video is unknown, then it should be
  118. // mentioned just once with ",,,,,,,,,," in place of LABEL,
  119. // [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX.
  120. // Sample top level CSV file:
  121. // TRAIN,gs://folder/train_videos.csv
  122. // TEST,gs://folder/test_videos.csv
  123. // UNASSIGNED,gs://folder/other_videos.csv
  124. // Seven sample rows of a CSV file for a particular ML_USE:
  125. // gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9
  126. // gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9
  127. // gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3
  128. // gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,,
  129. // gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,,
  130. // gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,,
  131. // gs://folder/video2.avi,,,,,,,,,,,
  132. // * For Text Extraction:
  133. // CSV file(s) with each line in format:
  134. // ML_USE,GCS_FILE_PATH
  135. // GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which
  136. // either imports text in-line or as documents. Any given
  137. // .JSONL file must be 100MB or smaller.
  138. // The in-line .JSONL file contains, per line, a proto that wraps a
  139. // TextSnippet proto (in json representation) followed by one or more
  140. // AnnotationPayload protos (called annotations), which have
  141. // display_name and text_extraction detail populated. The given text
  142. // is expected to be annotated exhaustively, for example, if you look
  143. // for animals and text contains "dolphin" that is not labeled, then
  144. // "dolphin" is assumed to not be an animal. Any given text snippet
  145. // content must be 10KB or smaller, and also be UTF-8 NFC encoded
  146. // (ASCII already is).
  147. // The document .JSONL file contains, per line, a proto that wraps a
  148. // Document proto. The Document proto must have either document_text
  149. // or input_config set. In document_text case, the Document proto may
  150. // also contain the spatial information of the document, including
  151. // layout, document dimension and page number. In input_config case,
  152. // only PDF documents are supported now, and each document may be up
  153. // to 2MB large. Currently, annotations on documents cannot be
  154. // specified at import.
  155. // Three sample CSV rows:
  156. // TRAIN,gs://folder/file1.jsonl
  157. // VALIDATE,gs://folder/file2.jsonl
  158. // TEST,gs://folder/file3.jsonl
  159. // Sample in-line JSON Lines file for entity extraction (presented here
  160. // with artificial line breaks, but the only actual line break is
  161. // denoted by \n).:
  162. // {
  163. // "document": {
  164. // "document_text": {"content": "dog cat"}
  165. // "layout": [
  166. // {
  167. // "text_segment": {
  168. // "start_offset": 0,
  169. // "end_offset": 3,
  170. // },
  171. // "page_number": 1,
  172. // "bounding_poly": {
  173. // "normalized_vertices": [
  174. // {"x": 0.1, "y": 0.1},
  175. // {"x": 0.1, "y": 0.3},
  176. // {"x": 0.3, "y": 0.3},
  177. // {"x": 0.3, "y": 0.1},
  178. // ],
  179. // },
  180. // "text_segment_type": TOKEN,
  181. // },
  182. // {
  183. // "text_segment": {
  184. // "start_offset": 4,
  185. // "end_offset": 7,
  186. // },
  187. // "page_number": 1,
  188. // "bounding_poly": {
  189. // "normalized_vertices": [
  190. // {"x": 0.4, "y": 0.1},
  191. // {"x": 0.4, "y": 0.3},
  192. // {"x": 0.8, "y": 0.3},
  193. // {"x": 0.8, "y": 0.1},
  194. // ],
  195. // },
  196. // "text_segment_type": TOKEN,
  197. // }
  198. //
  199. // ],
  200. // "document_dimensions": {
  201. // "width": 8.27,
  202. // "height": 11.69,
  203. // "unit": INCH,
  204. // }
  205. // "page_count": 1,
  206. // },
  207. // "annotations": [
  208. // {
  209. // "display_name": "animal",
  210. // "text_extraction": {"text_segment": {"start_offset": 0,
  211. // "end_offset": 3}}
  212. // },
  213. // {
  214. // "display_name": "animal",
  215. // "text_extraction": {"text_segment": {"start_offset": 4,
  216. // "end_offset": 7}}
  217. // }
  218. // ],
  219. // }\n
  220. // {
  221. // "text_snippet": {
  222. // "content": "This dog is good."
  223. // },
  224. // "annotations": [
  225. // {
  226. // "display_name": "animal",
  227. // "text_extraction": {
  228. // "text_segment": {"start_offset": 5, "end_offset": 8}
  229. // }
  230. // }
  231. // ]
  232. // }
  233. // Sample document JSON Lines file (presented here with artificial line
  234. // breaks, but the only actual line break is denoted by \n).:
  235. // {
  236. // "document": {
  237. // "input_config": {
  238. // "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
  239. // }
  240. // }
  241. // }
  242. // }\n
  243. // {
  244. // "document": {
  245. // "input_config": {
  246. // "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
  247. // }
  248. // }
  249. // }
  250. // }
  251. //
  252. // * For Text Classification:
  253. // CSV file(s) with each line in format:
  254. // ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,...
  255. // TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
  256. // the column content is a valid gcs file path, i.e. prefixed by
  257. // "gs://", it will be treated as a GCS_FILE_PATH, else if the content
  258. // is enclosed within double quotes (""), it is
  259. // treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
  260. // must lead to a .txt file with UTF-8 encoding, for example,
  261. // "gs://folder/content.txt", and the content in it is extracted
  262. // as a text snippet. In TEXT_SNIPPET case, the column content
  263. // excluding quotes is treated as to be imported text snippet. In
  264. // both cases, the text snippet/file size must be within 128kB.
  265. // Maximum 100 unique labels are allowed per CSV row.
  266. // Sample rows:
  267. // TRAIN,"They have bad food and very rude",RudeService,BadFood
  268. // TRAIN,gs://folder/content.txt,SlowService
  269. // TEST,"Typically always bad service there.",RudeService
  270. // VALIDATE,"Stomach ache to go.",BadFood
  271. //
  272. // * For Text Sentiment:
  273. // CSV file(s) with each line in format:
  274. // ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT
  275. // TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
  276. // the column content is a valid gcs file path, that is, prefixed by
  277. // "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated
  278. // as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
  279. // must lead to a .txt file with UTF-8 encoding, for example,
  280. // "gs://folder/content.txt", and the content in it is extracted
  281. // as a text snippet. In TEXT_SNIPPET case, the column content itself
  282. // is treated as to be imported text snippet. In both cases, the
  283. // text snippet must be up to 500 characters long.
  284. // Sample rows:
  285. // TRAIN,"@freewrytin this is way too good for your product",2
  286. // TRAIN,"I need this product so bad",3
  287. // TEST,"Thank you for this product.",4
  288. // VALIDATE,gs://folder/content.txt,2
  289. //
  290. // * For Tables:
  291. // Either
  292. // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
  293. //
  294. // [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]
  295. // can be used. All inputs is concatenated into a single
  296. //
  297. // [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name]
  298. // For gcs_source:
  299. // CSV file(s), where the first row of the first file is the header,
  300. // containing unique column names. If the first row of a subsequent
  301. // file is the same as the header, then it is also treated as a
  302. // header. All other rows contain values for the corresponding
  303. // columns.
  304. // Each .CSV file by itself must be 10GB or smaller, and their total
  305. // size must be 100GB or smaller.
  306. // First three sample rows of a CSV file:
  307. // "Id","First Name","Last Name","Dob","Addresses"
  308. //
  309. // "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
  310. //
  311. // "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
  312. // For bigquery_source:
  313. // An URI of a BigQuery table. The user data size of the BigQuery
  314. // table must be 100GB or smaller.
  315. // An imported table must have between 2 and 1,000 columns, inclusive,
  316. // and between 1000 and 100,000,000 rows, inclusive. There are at most 5
  317. // import data running in parallel.
  318. // Definitions:
  319. // ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED"
  320. // Describes how the given example (file) should be used for model
  321. // training. "UNASSIGNED" can be used when user has no preference.
  322. // GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png".
  323. // LABEL = A display name of an object on an image, video etc., e.g. "dog".
  324. // Must be up to 32 characters long and can consist only of ASCII
  325. // Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9.
  326. // For each label an AnnotationSpec is created which display_name
  327. // becomes the label; AnnotationSpecs are given back in predictions.
  328. // INSTANCE_ID = A positive integer that identifies a specific instance of a
  329. // labeled entity on an example. Used e.g. to track two cars on
  330. // a video while being able to tell apart which one is which.
  331. // BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,,
  332. // A rectangle parallel to the frame of the example (image,
  333. // video). If 4 vertices are given they are connected by edges
  334. // in the order provided, if 2 are given they are recognized
  335. // as diagonally opposite vertices of the rectangle.
  336. // VERTEX = COORDINATE,COORDINATE
  337. // First coordinate is horizontal (x), the second is vertical (y).
  338. // COORDINATE = A float in 0 to 1 range, relative to total length of
  339. // image or video in given dimension. For fractions the
  340. // leading non-decimal 0 can be omitted (i.e. 0.3 = .3).
  341. // Point 0,0 is in top left.
  342. // TIME_SEGMENT_START = TIME_OFFSET
  343. // Expresses a beginning, inclusive, of a time segment
  344. // within an example that has a time dimension
  345. // (e.g. video).
  346. // TIME_SEGMENT_END = TIME_OFFSET
  347. // Expresses an end, exclusive, of a time segment within
  348. // an example that has a time dimension (e.g. video).
  349. // TIME_OFFSET = A number of seconds as measured from the start of an
  350. // example (e.g. video). Fractions are allowed, up to a
  351. // microsecond precision. "inf" is allowed, and it means the end
  352. // of the example.
  353. // TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
  354. // double quotes ("").
  355. // SENTIMENT = An integer between 0 and
  356. // Dataset.text_sentiment_dataset_metadata.sentiment_max
  357. // (inclusive). Describes the ordinal of the sentiment - higher
  358. // value means a more positive sentiment. All the values are
  359. // completely relative, i.e. neither 0 needs to mean a negative or
  360. // neutral sentiment nor sentiment_max needs to mean a positive one
  361. // - it is just required that 0 is the least positive sentiment
  362. // in the data, and sentiment_max is the most positive one.
  363. // The SENTIMENT shouldn't be confused with "score" or "magnitude"
  364. // from the previous Natural Language Sentiment Analysis API.
  365. // All SENTIMENT values between 0 and sentiment_max must be
  366. // represented in the imported data. On prediction the same 0 to
  367. // sentiment_max range will be used. The difference between
  368. // neighboring sentiment values needs not to be uniform, e.g. 1 and
  369. // 2 may be similar whereas the difference between 2 and 3 may be
  370. // huge.
  371. //
  372. // Errors:
  373. // If any of the provided CSV files can't be parsed or if more than certain
  374. // percent of CSV rows cannot be processed then the operation fails and
  375. // nothing is imported. Regardless of overall success or failure the per-row
  376. // failures, up to a certain count cap, is listed in
  377. // Operation.metadata.partial_failures.
  378. //
  379. message InputConfig {
  380. // The source of the input.
  381. oneof source {
  382. // The Google Cloud Storage location for the input content.
  383. // In ImportData, the gcs_source points to a csv with structure described in
  384. // the comment.
  385. GcsSource gcs_source = 1;
  386. // The BigQuery location for the input content.
  387. BigQuerySource bigquery_source = 3;
  388. }
  389. // Additional domain-specific parameters describing the semantic of the
  390. // imported data, any string must be up to 25000
  391. // characters long.
  392. //
  393. // * For Tables:
  394. // `schema_inference_version` - (integer) Required. The version of the
  395. // algorithm that should be used for the initial inference of the
  396. // schema (columns' DataTypes) of the table the data is being imported
  397. // into. Allowed values: "1".
  398. map<string, string> params = 2;
  399. }
  400. // Input configuration for BatchPredict Action.
  401. //
  402. // The format of input depends on the ML problem of the model used for
  403. // prediction. As input source the
  404. // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
  405. // is expected, unless specified otherwise.
  406. //
  407. // The formats are represented in EBNF with commas being literal and with
  408. // non-terminal symbols defined near the end of this comment. The formats
  409. // are:
  410. //
  411. // * For Image Classification:
  412. // CSV file(s) with each line having just a single column:
  413. // GCS_FILE_PATH
  414. // which leads to image of up to 30MB in size. Supported
  415. // extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
  416. // the Batch predict output.
  417. // Three sample rows:
  418. // gs://folder/image1.jpeg
  419. // gs://folder/image2.gif
  420. // gs://folder/image3.png
  421. //
  422. // * For Image Object Detection:
  423. // CSV file(s) with each line having just a single column:
  424. // GCS_FILE_PATH
  425. // which leads to image of up to 30MB in size. Supported
  426. // extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
  427. // the Batch predict output.
  428. // Three sample rows:
  429. // gs://folder/image1.jpeg
  430. // gs://folder/image2.gif
  431. // gs://folder/image3.png
  432. // * For Video Classification:
  433. // CSV file(s) with each line in format:
  434. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
  435. // GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
  436. // duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
  437. // TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
  438. // length of the video, and end has to be after the start.
  439. // Three sample rows:
  440. // gs://folder/video1.mp4,10,40
  441. // gs://folder/video1.mp4,20,60
  442. // gs://folder/vid2.mov,0,inf
  443. //
  444. // * For Video Object Tracking:
  445. // CSV file(s) with each line in format:
  446. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
  447. // GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
  448. // duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
  449. // TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
  450. // length of the video, and end has to be after the start.
  451. // Three sample rows:
  452. // gs://folder/video1.mp4,10,240
  453. // gs://folder/video1.mp4,300,360
  454. // gs://folder/vid2.mov,0,inf
  455. // * For Text Classification:
  456. // CSV file(s) with each line having just a single column:
  457. // GCS_FILE_PATH | TEXT_SNIPPET
  458. // Any given text file can have size upto 128kB.
  459. // Any given text snippet content must have 60,000 characters or less.
  460. // Three sample rows:
  461. // gs://folder/text1.txt
  462. // "Some text content to predict"
  463. // gs://folder/text3.pdf
  464. // Supported file extensions: .txt, .pdf
  465. //
  466. // * For Text Sentiment:
  467. // CSV file(s) with each line having just a single column:
  468. // GCS_FILE_PATH | TEXT_SNIPPET
  469. // Any given text file can have size upto 128kB.
  470. // Any given text snippet content must have 500 characters or less.
  471. // Three sample rows:
  472. // gs://folder/text1.txt
  473. // "Some text content to predict"
  474. // gs://folder/text3.pdf
  475. // Supported file extensions: .txt, .pdf
  476. //
  477. // * For Text Extraction
  478. // .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or
  479. // as documents (for a single BatchPredict call only one of the these
  480. // formats may be used).
  481. // The in-line .JSONL file(s) contain per line a proto that
  482. // wraps a temporary user-assigned TextSnippet ID (string up to 2000
  483. // characters long) called "id", a TextSnippet proto (in
  484. // json representation) and zero or more TextFeature protos. Any given
  485. // text snippet content must have 30,000 characters or less, and also
  486. // be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
  487. // unique.
  488. // The document .JSONL file(s) contain, per line, a proto that wraps a
  489. // Document proto with input_config set. Only PDF documents are
  490. // supported now, and each document must be up to 2MB large.
  491. // Any given .JSONL file must be 100MB or smaller, and no more than 20
  492. // files may be given.
  493. // Sample in-line JSON Lines file (presented here with artificial line
  494. // breaks, but the only actual line break is denoted by \n):
  495. // {
  496. // "id": "my_first_id",
  497. // "text_snippet": { "content": "dog car cat"},
  498. // "text_features": [
  499. // {
  500. // "text_segment": {"start_offset": 4, "end_offset": 6},
  501. // "structural_type": PARAGRAPH,
  502. // "bounding_poly": {
  503. // "normalized_vertices": [
  504. // {"x": 0.1, "y": 0.1},
  505. // {"x": 0.1, "y": 0.3},
  506. // {"x": 0.3, "y": 0.3},
  507. // {"x": 0.3, "y": 0.1},
  508. // ]
  509. // },
  510. // }
  511. // ],
  512. // }\n
  513. // {
  514. // "id": "2",
  515. // "text_snippet": {
  516. // "content": "An elaborate content",
  517. // "mime_type": "text/plain"
  518. // }
  519. // }
  520. // Sample document JSON Lines file (presented here with artificial line
  521. // breaks, but the only actual line break is denoted by \n).:
  522. // {
  523. // "document": {
  524. // "input_config": {
  525. // "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
  526. // }
  527. // }
  528. // }
  529. // }\n
  530. // {
  531. // "document": {
  532. // "input_config": {
  533. // "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
  534. // }
  535. // }
  536. // }
  537. // }
  538. //
  539. // * For Tables:
  540. // Either
  541. // [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
  542. //
  543. // [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source].
  544. // GCS case:
  545. // CSV file(s), each by itself 10GB or smaller and total size must be
  546. // 100GB or smaller, where first file must have a header containing
  547. // column names. If the first row of a subsequent file is the same as
  548. // the header, then it is also treated as a header. All other rows
  549. // contain values for the corresponding columns.
  550. // The column names must contain the model's
  551. //
  552. // [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
  553. //
  554. // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
  555. // (order doesn't matter). The columns corresponding to the model's
  556. // input feature column specs must contain values compatible with the
  557. // column spec's data types. Prediction on all the rows, i.e. the CSV
  558. // lines, will be attempted. For FORECASTING
  559. //
  560. // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
  561. // all columns having
  562. //
  563. // [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
  564. // type will be ignored.
  565. // First three sample rows of a CSV file:
  566. // "First Name","Last Name","Dob","Addresses"
  567. //
  568. // "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
  569. //
  570. // "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
  571. // BigQuery case:
  572. // An URI of a BigQuery table. The user data size of the BigQuery
  573. // table must be 100GB or smaller.
  574. // The column names must contain the model's
  575. //
  576. // [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
  577. //
  578. // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
  579. // (order doesn't matter). The columns corresponding to the model's
  580. // input feature column specs must contain values compatible with the
  581. // column spec's data types. Prediction on all the rows of the table
  582. // will be attempted. For FORECASTING
  583. //
  584. // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
  585. // all columns having
  586. //
  587. // [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
  588. // type will be ignored.
  589. //
  590. // Definitions:
  591. // GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi".
  592. // TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
  593. // double quotes ("")
  594. // TIME_SEGMENT_START = TIME_OFFSET
  595. // Expresses a beginning, inclusive, of a time segment
  596. // within an
  597. // example that has a time dimension (e.g. video).
  598. // TIME_SEGMENT_END = TIME_OFFSET
  599. // Expresses an end, exclusive, of a time segment within
  600. // an example that has a time dimension (e.g. video).
  601. // TIME_OFFSET = A number of seconds as measured from the start of an
  602. // example (e.g. video). Fractions are allowed, up to a
  603. // microsecond precision. "inf" is allowed and it means the end
  604. // of the example.
  605. //
  606. // Errors:
  607. // If any of the provided CSV files can't be parsed or if more than certain
  608. // percent of CSV rows cannot be processed then the operation fails and
  609. // prediction does not happen. Regardless of overall success or failure the
  610. // per-row failures, up to a certain count cap, will be listed in
  611. // Operation.metadata.partial_failures.
  612. message BatchPredictInputConfig {
  613. // Required. The source of the input.
  614. oneof source {
  615. // The Google Cloud Storage location for the input content.
  616. GcsSource gcs_source = 1;
  617. // The BigQuery location for the input content.
  618. BigQuerySource bigquery_source = 2;
  619. }
  620. }
  621. // Input configuration of a [Document][google.cloud.automl.v1beta1.Document].
  622. message DocumentInputConfig {
  623. // The Google Cloud Storage location of the document file. Only a single path
  624. // should be given.
  625. // Max supported size: 512MB.
  626. // Supported extensions: .PDF.
  627. GcsSource gcs_source = 1;
  628. }
  629. // * For Translation:
  630. // CSV file `translation.csv`, with each line in format:
  631. // ML_USE,GCS_FILE_PATH
  632. // GCS_FILE_PATH leads to a .TSV file which describes examples that have
  633. // given ML_USE, using the following row format per line:
  634. // TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
  635. // language)
  636. //
  637. // * For Tables:
  638. // Output depends on whether the dataset was imported from GCS or
  639. // BigQuery.
  640. // GCS case:
  641. //
  642. // [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
  643. // must be set. Exported are CSV file(s) `tables_1.csv`,
  644. // `tables_2.csv`,...,`tables_N.csv` with each having as header line
  645. // the table's column names, and all other lines contain values for
  646. // the header columns.
  647. // BigQuery case:
  648. //
  649. // [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
  650. // pointing to a BigQuery project must be set. In the given project a
  651. // new dataset will be created with name
  652. //
  653. // `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
  654. // where <automl-dataset-display-name> will be made
  655. // BigQuery-dataset-name compatible (e.g. most special characters will
  656. // become underscores), and timestamp will be in
  657. // YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
  658. // dataset a new table called `primary_table` will be created, and
  659. // filled with precisely the same data as this obtained on import.
  660. message OutputConfig {
  661. // Required. The destination of the output.
  662. oneof destination {
  663. // The Google Cloud Storage location where the output is to be written to.
  664. // For Image Object Detection, Text Extraction, Video Classification and
  665. // Tables, in the given directory a new directory will be created with name:
  666. // export_data-<dataset-display-name>-<timestamp-of-export-call> where
  667. // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
  668. // output will be written into that directory.
  669. GcsDestination gcs_destination = 1;
  670. // The BigQuery location where the output is to be written to.
  671. BigQueryDestination bigquery_destination = 2;
  672. }
  673. }
  674. // Output configuration for BatchPredict Action.
  675. //
  676. // As destination the
  677. //
  678. // [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
  679. // must be set unless specified otherwise for a domain. If gcs_destination is
  680. // set then in the given directory a new directory is created. Its name
  681. // will be
  682. // "prediction-<model-display-name>-<timestamp-of-prediction-call>",
  683. // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents
  684. // of it depends on the ML problem the predictions are made for.
  685. //
  686. // * For Image Classification:
  687. // In the created directory files `image_classification_1.jsonl`,
  688. // `image_classification_2.jsonl`,...,`image_classification_N.jsonl`
  689. // will be created, where N may be 1, and depends on the
  690. // total number of the successfully predicted images and annotations.
  691. // A single image will be listed only once with all its annotations,
  692. // and its annotations will never be split across files.
  693. // Each .JSONL file will contain, per line, a JSON representation of a
  694. // proto that wraps image's "ID" : "<id_value>" followed by a list of
  695. // zero or more AnnotationPayload protos (called annotations), which
  696. // have classification detail populated.
  697. // If prediction for any image failed (partially or completely), then an
  698. // additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
  699. // files will be created (N depends on total number of failed
  700. // predictions). These files will have a JSON representation of a proto
  701. // that wraps the same "ID" : "<id_value>" but here followed by
  702. // exactly one
  703. //
  704. // [`google.rpc.Status`](https:
  705. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  706. // containing only `code` and `message`fields.
  707. //
  708. // * For Image Object Detection:
  709. // In the created directory files `image_object_detection_1.jsonl`,
  710. // `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl`
  711. // will be created, where N may be 1, and depends on the
  712. // total number of the successfully predicted images and annotations.
  713. // Each .JSONL file will contain, per line, a JSON representation of a
  714. // proto that wraps image's "ID" : "<id_value>" followed by a list of
  715. // zero or more AnnotationPayload protos (called annotations), which
  716. // have image_object_detection detail populated. A single image will
  717. // be listed only once with all its annotations, and its annotations
  718. // will never be split across files.
  719. // If prediction for any image failed (partially or completely), then
  720. // additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
  721. // files will be created (N depends on total number of failed
  722. // predictions). These files will have a JSON representation of a proto
  723. // that wraps the same "ID" : "<id_value>" but here followed by
  724. // exactly one
  725. //
  726. // [`google.rpc.Status`](https:
  727. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  728. // containing only `code` and `message`fields.
  729. // * For Video Classification:
  730. // In the created directory a video_classification.csv file, and a .JSON
  731. // file per each video classification requested in the input (i.e. each
  732. // line in given CSV(s)), will be created.
  733. //
  734. // The format of video_classification.csv is:
  735. //
  736. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
  737. // where:
  738. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
  739. // the prediction input lines (i.e. video_classification.csv has
  740. // precisely the same number of lines as the prediction input had.)
  741. // JSON_FILE_NAME = Name of .JSON file in the output directory, which
  742. // contains prediction responses for the video time segment.
  743. // STATUS = "OK" if prediction completed successfully, or an error code
  744. // with message otherwise. If STATUS is not "OK" then the .JSON file
  745. // for that line may not exist or be empty.
  746. //
  747. // Each .JSON file, assuming STATUS is "OK", will contain a list of
  748. // AnnotationPayload protos in JSON format, which are the predictions
  749. // for the video time segment the file is assigned to in the
  750. // video_classification.csv. All AnnotationPayload protos will have
  751. // video_classification field set, and will be sorted by
  752. // video_classification.type field (note that the returned types are
  753. // governed by `classifaction_types` parameter in
  754. // [PredictService.BatchPredictRequest.params][]).
  755. //
  756. // * For Video Object Tracking:
  757. // In the created directory a video_object_tracking.csv file will be
  758. // created, and multiple files video_object_trackinng_1.json,
  759. // video_object_trackinng_2.json,..., video_object_trackinng_N.json,
  760. // where N is the number of requests in the input (i.e. the number of
  761. // lines in given CSV(s)).
  762. //
  763. // The format of video_object_tracking.csv is:
  764. //
  765. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
  766. // where:
  767. // GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
  768. // the prediction input lines (i.e. video_object_tracking.csv has
  769. // precisely the same number of lines as the prediction input had.)
  770. // JSON_FILE_NAME = Name of .JSON file in the output directory, which
  771. // contains prediction responses for the video time segment.
  772. // STATUS = "OK" if prediction completed successfully, or an error
  773. // code with message otherwise. If STATUS is not "OK" then the .JSON
  774. // file for that line may not exist or be empty.
  775. //
  776. // Each .JSON file, assuming STATUS is "OK", will contain a list of
  777. // AnnotationPayload protos in JSON format, which are the predictions
  778. // for each frame of the video time segment the file is assigned to in
  779. // video_object_tracking.csv. All AnnotationPayload protos will have
  780. // video_object_tracking field set.
  781. // * For Text Classification:
  782. // In the created directory files `text_classification_1.jsonl`,
  783. // `text_classification_2.jsonl`,...,`text_classification_N.jsonl`
  784. // will be created, where N may be 1, and depends on the
  785. // total number of inputs and annotations found.
  786. //
  787. // Each .JSONL file will contain, per line, a JSON representation of a
  788. // proto that wraps input text snippet or input text file and a list of
  789. // zero or more AnnotationPayload protos (called annotations), which
  790. // have classification detail populated. A single text snippet or file
  791. // will be listed only once with all its annotations, and its
  792. // annotations will never be split across files.
  793. //
  794. // If prediction for any text snippet or file failed (partially or
  795. // completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
  796. // `errors_N.jsonl` files will be created (N depends on total number of
  797. // failed predictions). These files will have a JSON representation of a
  798. // proto that wraps input text snippet or input text file followed by
  799. // exactly one
  800. //
  801. // [`google.rpc.Status`](https:
  802. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  803. // containing only `code` and `message`.
  804. //
  805. // * For Text Sentiment:
  806. // In the created directory files `text_sentiment_1.jsonl`,
  807. // `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl`
  808. // will be created, where N may be 1, and depends on the
  809. // total number of inputs and annotations found.
  810. //
  811. // Each .JSONL file will contain, per line, a JSON representation of a
  812. // proto that wraps input text snippet or input text file and a list of
  813. // zero or more AnnotationPayload protos (called annotations), which
  814. // have text_sentiment detail populated. A single text snippet or file
  815. // will be listed only once with all its annotations, and its
  816. // annotations will never be split across files.
  817. //
  818. // If prediction for any text snippet or file failed (partially or
  819. // completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
  820. // `errors_N.jsonl` files will be created (N depends on total number of
  821. // failed predictions). These files will have a JSON representation of a
  822. // proto that wraps input text snippet or input text file followed by
  823. // exactly one
  824. //
  825. // [`google.rpc.Status`](https:
  826. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  827. // containing only `code` and `message`.
  828. //
  829. // * For Text Extraction:
  830. // In the created directory files `text_extraction_1.jsonl`,
  831. // `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl`
  832. // will be created, where N may be 1, and depends on the
  833. // total number of inputs and annotations found.
  834. // The contents of these .JSONL file(s) depend on whether the input
  835. // used inline text, or documents.
  836. // If input was inline, then each .JSONL file will contain, per line,
  837. // a JSON representation of a proto that wraps given in request text
  838. // snippet's "id" (if specified), followed by input text snippet,
  839. // and a list of zero or more
  840. // AnnotationPayload protos (called annotations), which have
  841. // text_extraction detail populated. A single text snippet will be
  842. // listed only once with all its annotations, and its annotations will
  843. // never be split across files.
  844. // If input used documents, then each .JSONL file will contain, per
  845. // line, a JSON representation of a proto that wraps given in request
  846. // document proto, followed by its OCR-ed representation in the form
  847. // of a text snippet, finally followed by a list of zero or more
  848. // AnnotationPayload protos (called annotations), which have
  849. // text_extraction detail populated and refer, via their indices, to
  850. // the OCR-ed text snippet. A single document (and its text snippet)
  851. // will be listed only once with all its annotations, and its
  852. // annotations will never be split across files.
  853. // If prediction for any text snippet failed (partially or completely),
  854. // then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
  855. // `errors_N.jsonl` files will be created (N depends on total number of
  856. // failed predictions). These files will have a JSON representation of a
  857. // proto that wraps either the "id" : "<id_value>" (in case of inline)
  858. // or the document proto (in case of document) but here followed by
  859. // exactly one
  860. //
  861. // [`google.rpc.Status`](https:
  862. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  863. // containing only `code` and `message`.
  864. //
  865. // * For Tables:
  866. // Output depends on whether
  867. //
  868. // [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
  869. // or
  870. //
  871. // [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination]
  872. // is set (either is allowed).
  873. // GCS case:
  874. // In the created directory files `tables_1.csv`, `tables_2.csv`,...,
  875. // `tables_N.csv` will be created, where N may be 1, and depends on
  876. // the total number of the successfully predicted rows.
  877. // For all CLASSIFICATION
  878. //
  879. // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
  880. // Each .csv file will contain a header, listing all columns'
  881. //
  882. // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
  883. // given on input followed by M target column names in the format of
  884. //
  885. // "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
  886. //
  887. // [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>_<target
  888. // value>_score" where M is the number of distinct target values,
  889. // i.e. number of distinct values in the target column of the table
  890. // used to train the model. Subsequent lines will contain the
  891. // respective values of successfully predicted rows, with the last,
  892. // i.e. the target, columns having the corresponding prediction
  893. // [scores][google.cloud.automl.v1beta1.TablesAnnotation.score].
  894. // For REGRESSION and FORECASTING
  895. //
  896. // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
  897. // Each .csv file will contain a header, listing all columns'
  898. // [display_name-s][google.cloud.automl.v1beta1.display_name] given
  899. // on input followed by the predicted target column with name in the
  900. // format of
  901. //
  902. // "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
  903. //
  904. // [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
  905. // Subsequent lines will contain the respective values of
  906. // successfully predicted rows, with the last, i.e. the target,
  907. // column having the predicted target value.
  908. // If prediction for any rows failed, then an additional
  909. // `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be
  910. // created (N depends on total number of failed rows). These files
  911. // will have analogous format as `tables_*.csv`, but always with a
  912. // single target column having
  913. //
  914. // [`google.rpc.Status`](https:
  915. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  916. // represented as a JSON string, and containing only `code` and
  917. // `message`.
  918. // BigQuery case:
  919. //
  920. // [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
  921. // pointing to a BigQuery project must be set. In the given project a
  922. // new dataset will be created with name
  923. // `prediction_<model-display-name>_<timestamp-of-prediction-call>`
  924. // where <model-display-name> will be made
  925. // BigQuery-dataset-name compatible (e.g. most special characters will
  926. // become underscores), and timestamp will be in
  927. // YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
  928. // two tables will be created, `predictions`, and `errors`.
  929. // The `predictions` table's column names will be the input columns'
  930. //
  931. // [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
  932. // followed by the target column with name in the format of
  933. //
  934. // "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
  935. //
  936. // [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
  937. // The input feature columns will contain the respective values of
  938. // successfully predicted rows, with the target column having an
  939. // ARRAY of
  940. //
  941. // [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
  942. // represented as STRUCT-s, containing
  943. // [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
  944. // The `errors` table contains rows for which the prediction has
  945. // failed, it has analogous input columns while the target column name
  946. // is in the format of
  947. //
  948. // "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
  949. //
  950. // [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>",
  951. // and as a value has
  952. //
  953. // [`google.rpc.Status`](https:
  954. // //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
  955. // represented as a STRUCT, and containing only `code` and `message`.
  956. message BatchPredictOutputConfig {
  957. // Required. The destination of the output.
  958. oneof destination {
  959. // The Google Cloud Storage location of the directory where the output is to
  960. // be written to.
  961. GcsDestination gcs_destination = 1;
  962. // The BigQuery location where the output is to be written to.
  963. BigQueryDestination bigquery_destination = 2;
  964. }
  965. }
  966. // Output configuration for ModelExport Action.
  967. message ModelExportOutputConfig {
  968. // Required. The destination of the output.
  969. oneof destination {
  970. // The Google Cloud Storage location where the model is to be written to.
  971. // This location may only be set for the following model formats:
  972. // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
  973. //
  974. // Under the directory given as the destination a new one with name
  975. // "model-export-<model-display-name>-<timestamp-of-export-call>",
  976. // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
  977. // will be created. Inside the model and any of its supporting files
  978. // will be written.
  979. GcsDestination gcs_destination = 1;
  980. // The GCR location where model image is to be pushed to. This location
  981. // may only be set for the following model formats:
  982. // "docker".
  983. //
  984. // The model image will be created under the given URI.
  985. GcrDestination gcr_destination = 3;
  986. }
  987. // The format in which the model must be exported. The available, and default,
  988. // formats depend on the problem and model type (if given problem and type
  989. // combination doesn't have a format listed, it means its models are not
  990. // exportable):
  991. //
  992. // * For Image Classification mobile-low-latency-1, mobile-versatile-1,
  993. // mobile-high-accuracy-1:
  994. // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
  995. // "docker".
  996. //
  997. // * For Image Classification mobile-core-ml-low-latency-1,
  998. // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
  999. // "core_ml" (default).
  1000. //
  1001. // * For Image Object Detection mobile-low-latency-1, mobile-versatile-1,
  1002. // mobile-high-accuracy-1:
  1003. // "tflite", "tf_saved_model", "tf_js".
  1004. //
  1005. // * For Video Classification cloud,
  1006. // "tf_saved_model".
  1007. //
  1008. // * For Video Object Tracking cloud,
  1009. // "tf_saved_model".
  1010. //
  1011. // * For Video Object Tracking mobile-versatile-1:
  1012. // "tflite", "edgetpu_tflite", "tf_saved_model", "docker".
  1013. //
  1014. // * For Video Object Tracking mobile-coral-versatile-1:
  1015. // "tflite", "edgetpu_tflite", "docker".
  1016. //
  1017. // * For Video Object Tracking mobile-coral-low-latency-1:
  1018. // "tflite", "edgetpu_tflite", "docker".
  1019. //
  1020. // * For Video Object Tracking mobile-jetson-versatile-1:
  1021. // "tf_saved_model", "docker".
  1022. //
  1023. // * For Tables:
  1024. // "docker".
  1025. //
  1026. // Formats description:
  1027. //
  1028. // * tflite - Used for Android mobile devices.
  1029. // * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/)
  1030. // devices.
  1031. // * tf_saved_model - A tensorflow model in SavedModel format.
  1032. // * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can
  1033. // be used in the browser and in Node.js using JavaScript.
  1034. // * docker - Used for Docker containers. Use the params field to customize
  1035. // the container. The container is verified to work correctly on
  1036. // ubuntu 16.04 operating system. See more at
  1037. // [containers
  1038. //
  1039. // quickstart](https:
  1040. // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
  1041. // * core_ml - Used for iOS mobile devices.
  1042. string model_format = 4;
  1043. // Additional model-type and format specific parameters describing the
  1044. // requirements for the to be exported model files, any string must be up to
  1045. // 25000 characters long.
  1046. //
  1047. // * For `docker` format:
  1048. // `cpu_architecture` - (string) "x86_64" (default).
  1049. // `gpu_architecture` - (string) "none" (default), "nvidia".
  1050. map<string, string> params = 2;
  1051. }
  1052. // Output configuration for ExportEvaluatedExamples Action. Note that this call
  1053. // is available only for 30 days since the moment the model was evaluated.
  1054. // The output depends on the domain, as follows (note that only examples from
  1055. // the TEST set are exported):
  1056. //
  1057. // * For Tables:
  1058. //
  1059. // [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
  1060. // pointing to a BigQuery project must be set. In the given project a
  1061. // new dataset will be created with name
  1062. //
  1063. // `export_evaluated_examples_<model-display-name>_<timestamp-of-export-call>`
  1064. // where <model-display-name> will be made BigQuery-dataset-name
  1065. // compatible (e.g. most special characters will become underscores),
  1066. // and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601"
  1067. // format. In the dataset an `evaluated_examples` table will be
  1068. // created. It will have all the same columns as the
  1069. //
  1070. // [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]
  1071. // of the
  1072. // [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which
  1073. // the model was created, as they were at the moment of model's
  1074. // evaluation (this includes the target column with its ground
  1075. // truth), followed by a column called "predicted_<target_column>". That
  1076. // last column will contain the model's prediction result for each
  1077. // respective row, given as ARRAY of
  1078. // [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
  1079. // represented as STRUCT-s, containing
  1080. // [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
  1081. message ExportEvaluatedExamplesOutputConfig {
  1082. // Required. The destination of the output.
  1083. oneof destination {
  1084. // The BigQuery location where the output is to be written to.
  1085. BigQueryDestination bigquery_destination = 2;
  1086. }
  1087. }
  1088. // The Google Cloud Storage location for the input content.
  1089. message GcsSource {
  1090. // Required. Google Cloud Storage URIs to input files, up to 2000 characters
  1091. // long. Accepted forms:
  1092. // * Full object path, e.g. gs://bucket/directory/object.csv
  1093. repeated string input_uris = 1;
  1094. }
  1095. // The BigQuery location for the input content.
  1096. message BigQuerySource {
  1097. // Required. BigQuery URI to a table, up to 2000 characters long.
  1098. // Accepted forms:
  1099. // * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId
  1100. string input_uri = 1;
  1101. }
  1102. // The Google Cloud Storage location where the output is to be written to.
  1103. message GcsDestination {
  1104. // Required. Google Cloud Storage URI to output directory, up to 2000
  1105. // characters long.
  1106. // Accepted forms:
  1107. // * Prefix path: gs://bucket/directory
  1108. // The requesting user must have write permission to the bucket.
  1109. // The directory is created if it doesn't exist.
  1110. string output_uri_prefix = 1;
  1111. }
  1112. // The BigQuery location for the output content.
  1113. message BigQueryDestination {
  1114. // Required. BigQuery URI to a project, up to 2000 characters long.
  1115. // Accepted forms:
  1116. // * BigQuery path e.g. bq://projectId
  1117. string output_uri = 1;
  1118. }
  1119. // The GCR location where the image must be pushed to.
  1120. message GcrDestination {
  1121. // Required. Google Contained Registry URI of the new image, up to 2000
  1122. // characters long. See
  1123. //
  1124. // https:
  1125. // //cloud.google.com/container-registry/do
  1126. // // cs/pushing-and-pulling#pushing_an_image_to_a_registry
  1127. // Accepted forms:
  1128. // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
  1129. // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
  1130. //
  1131. // The requesting user must have permission to push images the project.
  1132. string output_uri = 1;
  1133. }