Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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="ml_v1.html">Google Cloud Machine Learning Engine</a> . <a href="ml_v1.projects.html">projects</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="ml_v1.projects.jobs.html">jobs()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the jobs Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="ml_v1.projects.models.html">models()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the models Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
| 88 | <code><a href="ml_v1.projects.operations.html">operations()</a></code> |
| 89 | </p> |
| 90 | <p class="firstline">Returns the operations Resource.</p> |
| 91 | |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#getConfig">getConfig(name=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Get the service account information associated with your project. You need</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#predict">predict(name=None, body, x__xgafv=None)</a></code></p> |
| 97 | <p class="firstline">Performs prediction on the data in the request.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
| 100 | <code class="details" id="getConfig">getConfig(name=None, x__xgafv=None)</code> |
| 101 | <pre>Get the service account information associated with your project. You need |
| 102 | this information in order to grant the service account persmissions for |
| 103 | the Google Cloud Storage location where you put your model training code |
| 104 | for training the model with Google Cloud Machine Learning. |
| 105 | |
| 106 | Args: |
| 107 | name: string, Required. The project name. |
| 108 | |
| 109 | Authorization: requires `Viewer` role on the specified project. (required) |
| 110 | x__xgafv: string, V1 error format. |
| 111 | Allowed values |
| 112 | 1 - v1 error format |
| 113 | 2 - v2 error format |
| 114 | |
| 115 | Returns: |
| 116 | An object of the form: |
| 117 | |
| 118 | { # Returns service account information associated with a project. |
| 119 | "serviceAccountProject": "A String", # The project number for `service_account`. |
| 120 | "serviceAccount": "A String", # The service account Cloud ML uses to access resources in the project. |
| 121 | }</pre> |
| 122 | </div> |
| 123 | |
| 124 | <div class="method"> |
| 125 | <code class="details" id="predict">predict(name=None, body, x__xgafv=None)</code> |
| 126 | <pre>Performs prediction on the data in the request. |
| 127 | |
| 128 | **** REMOVE FROM GENERATED DOCUMENTATION |
| 129 | |
| 130 | Args: |
| 131 | name: string, Required. The resource name of a model or a version. |
| 132 | |
| 133 | Authorization: requires `Viewer` role on the parent project. (required) |
| 134 | body: object, The request body. (required) |
| 135 | The object takes the form of: |
| 136 | |
| 137 | { # Request for predictions to be issued against a trained model. |
| 138 | # |
| 139 | # The body of the request is a single JSON object with a single top-level |
| 140 | # field: |
| 141 | # |
| 142 | # <dl> |
| 143 | # <dt>instances</dt> |
| 144 | # <dd>A JSON array containing values representing the instances to use for |
| 145 | # prediction.</dd> |
| 146 | # </dl> |
| 147 | # |
| 148 | # The structure of each element of the instances list is determined by your |
| 149 | # model's input definition. Instances can include named inputs or can contain |
| 150 | # only unlabeled values. |
| 151 | # |
| 152 | # Not all data includes named inputs. Some instances will be simple |
| 153 | # JSON values (boolean, number, or string). However, instances are often lists |
| 154 | # of simple values, or complex nested lists. Here are some examples of request |
| 155 | # bodies: |
| 156 | # |
| 157 | # CSV data with each row encoded as a string value: |
| 158 | # <pre> |
| 159 | # {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]} |
| 160 | # </pre> |
| 161 | # Plain text: |
| 162 | # <pre> |
| 163 | # {"instances": ["the quick brown fox", "la bruja le dio"]} |
| 164 | # </pre> |
| 165 | # Sentences encoded as lists of words (vectors of strings): |
| 166 | # <pre> |
| 167 | # { |
| 168 | # "instances": [ |
| 169 | # ["the","quick","brown"], |
| 170 | # ["la","bruja","le"], |
| 171 | # ... |
| 172 | # ] |
| 173 | # } |
| 174 | # </pre> |
| 175 | # Floating point scalar values: |
| 176 | # <pre> |
| 177 | # {"instances": [0.0, 1.1, 2.2]} |
| 178 | # </pre> |
| 179 | # Vectors of integers: |
| 180 | # <pre> |
| 181 | # { |
| 182 | # "instances": [ |
| 183 | # [0, 1, 2], |
| 184 | # [3, 4, 5], |
| 185 | # ... |
| 186 | # ] |
| 187 | # } |
| 188 | # </pre> |
| 189 | # Tensors (in this case, two-dimensional tensors): |
| 190 | # <pre> |
| 191 | # { |
| 192 | # "instances": [ |
| 193 | # [ |
| 194 | # [0, 1, 2], |
| 195 | # [3, 4, 5] |
| 196 | # ], |
| 197 | # ... |
| 198 | # ] |
| 199 | # } |
| 200 | # </pre> |
| 201 | # Images can be represented different ways. In this encoding scheme the first |
| 202 | # two dimensions represent the rows and columns of the image, and the third |
| 203 | # contains lists (vectors) of the R, G, and B values for each pixel. |
| 204 | # <pre> |
| 205 | # { |
| 206 | # "instances": [ |
| 207 | # [ |
| 208 | # [ |
| 209 | # [138, 30, 66], |
| 210 | # [130, 20, 56], |
| 211 | # ... |
| 212 | # ], |
| 213 | # [ |
| 214 | # [126, 38, 61], |
| 215 | # [122, 24, 57], |
| 216 | # ... |
| 217 | # ], |
| 218 | # ... |
| 219 | # ], |
| 220 | # ... |
| 221 | # ] |
| 222 | # } |
| 223 | # </pre> |
| 224 | # JSON strings must be encoded as UTF-8. To send binary data, you must |
| 225 | # base64-encode the data and mark it as binary. To mark a JSON string |
| 226 | # as binary, replace it with a JSON object with a single attribute named `b64`: |
| 227 | # <pre>{"b64": "..."} </pre> |
| 228 | # For example: |
| 229 | # |
| 230 | # Two Serialized tf.Examples (fake data, for illustrative purposes only): |
| 231 | # <pre> |
| 232 | # {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]} |
| 233 | # </pre> |
| 234 | # Two JPEG image byte strings (fake data, for illustrative purposes only): |
| 235 | # <pre> |
| 236 | # {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]} |
| 237 | # </pre> |
| 238 | # If your data includes named references, format each instance as a JSON object |
| 239 | # with the named references as the keys: |
| 240 | # |
| 241 | # JSON input data to be preprocessed: |
| 242 | # <pre> |
| 243 | # { |
| 244 | # "instances": [ |
| 245 | # { |
| 246 | # "a": 1.0, |
| 247 | # "b": true, |
| 248 | # "c": "x" |
| 249 | # }, |
| 250 | # { |
| 251 | # "a": -2.0, |
| 252 | # "b": false, |
| 253 | # "c": "y" |
| 254 | # } |
| 255 | # ] |
| 256 | # } |
| 257 | # </pre> |
| 258 | # Some models have an underlying TensorFlow graph that accepts multiple input |
| 259 | # tensors. In this case, you should use the names of JSON name/value pairs to |
| 260 | # identify the input tensors, as shown in the following exmaples: |
| 261 | # |
| 262 | # For a graph with input tensor aliases "tag" (string) and "image" |
| 263 | # (base64-encoded string): |
| 264 | # <pre> |
| 265 | # { |
| 266 | # "instances": [ |
| 267 | # { |
| 268 | # "tag": "beach", |
| 269 | # "image": {"b64": "ASa8asdf"} |
| 270 | # }, |
| 271 | # { |
| 272 | # "tag": "car", |
| 273 | # "image": {"b64": "JLK7ljk3"} |
| 274 | # } |
| 275 | # ] |
| 276 | # } |
| 277 | # </pre> |
| 278 | # For a graph with input tensor aliases "tag" (string) and "image" |
| 279 | # (3-dimensional array of 8-bit ints): |
| 280 | # <pre> |
| 281 | # { |
| 282 | # "instances": [ |
| 283 | # { |
| 284 | # "tag": "beach", |
| 285 | # "image": [ |
| 286 | # [ |
| 287 | # [138, 30, 66], |
| 288 | # [130, 20, 56], |
| 289 | # ... |
| 290 | # ], |
| 291 | # [ |
| 292 | # [126, 38, 61], |
| 293 | # [122, 24, 57], |
| 294 | # ... |
| 295 | # ], |
| 296 | # ... |
| 297 | # ] |
| 298 | # }, |
| 299 | # { |
| 300 | # "tag": "car", |
| 301 | # "image": [ |
| 302 | # [ |
| 303 | # [255, 0, 102], |
| 304 | # [255, 0, 97], |
| 305 | # ... |
| 306 | # ], |
| 307 | # [ |
| 308 | # [254, 1, 101], |
| 309 | # [254, 2, 93], |
| 310 | # ... |
| 311 | # ], |
| 312 | # ... |
| 313 | # ] |
| 314 | # }, |
| 315 | # ... |
| 316 | # ] |
| 317 | # } |
| 318 | # </pre> |
| 319 | # If the call is successful, the response body will contain one prediction |
| 320 | # entry per instance in the request body. If prediction fails for any |
| 321 | # instance, the response body will contain no predictions and will contian |
| 322 | # a single error entry instead. |
| 323 | "httpBody": { # Message that represents an arbitrary HTTP body. It should only be used for # |
| 324 | # Required. The prediction request body. |
| 325 | # payload formats that can't be represented as JSON, such as raw binary or |
| 326 | # an HTML page. |
| 327 | # |
| 328 | # |
| 329 | # This message can be used both in streaming and non-streaming API methods in |
| 330 | # the request as well as the response. |
| 331 | # |
| 332 | # It can be used as a top-level request field, which is convenient if one |
| 333 | # wants to extract parameters from either the URL or HTTP template into the |
| 334 | # request fields and also want access to the raw HTTP body. |
| 335 | # |
| 336 | # Example: |
| 337 | # |
| 338 | # message GetResourceRequest { |
| 339 | # // A unique request id. |
| 340 | # string request_id = 1; |
| 341 | # |
| 342 | # // The raw HTTP body is bound to this field. |
| 343 | # google.api.HttpBody http_body = 2; |
| 344 | # } |
| 345 | # |
| 346 | # service ResourceService { |
| 347 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
| 348 | # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); |
| 349 | # } |
| 350 | # |
| 351 | # Example with streaming methods: |
| 352 | # |
| 353 | # service CaldavService { |
| 354 | # rpc GetCalendar(stream google.api.HttpBody) |
| 355 | # returns (stream google.api.HttpBody); |
| 356 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 357 | # returns (stream google.api.HttpBody); |
| 358 | # } |
| 359 | # |
| 360 | # Use of this type only changes how the request and response bodies are |
| 361 | # handled, all other features will continue to work unchanged. |
| 362 | "contentType": "A String", # The HTTP Content-Type string representing the content type of the body. |
| 363 | "data": "A String", # HTTP body binary data. |
| 364 | }, |
| 365 | } |
| 366 | |
| 367 | x__xgafv: string, V1 error format. |
| 368 | Allowed values |
| 369 | 1 - v1 error format |
| 370 | 2 - v2 error format |
| 371 | |
| 372 | Returns: |
| 373 | An object of the form: |
| 374 | |
| 375 | { # Message that represents an arbitrary HTTP body. It should only be used for |
| 376 | # payload formats that can't be represented as JSON, such as raw binary or |
| 377 | # an HTML page. |
| 378 | # |
| 379 | # |
| 380 | # This message can be used both in streaming and non-streaming API methods in |
| 381 | # the request as well as the response. |
| 382 | # |
| 383 | # It can be used as a top-level request field, which is convenient if one |
| 384 | # wants to extract parameters from either the URL or HTTP template into the |
| 385 | # request fields and also want access to the raw HTTP body. |
| 386 | # |
| 387 | # Example: |
| 388 | # |
| 389 | # message GetResourceRequest { |
| 390 | # // A unique request id. |
| 391 | # string request_id = 1; |
| 392 | # |
| 393 | # // The raw HTTP body is bound to this field. |
| 394 | # google.api.HttpBody http_body = 2; |
| 395 | # } |
| 396 | # |
| 397 | # service ResourceService { |
| 398 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
| 399 | # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); |
| 400 | # } |
| 401 | # |
| 402 | # Example with streaming methods: |
| 403 | # |
| 404 | # service CaldavService { |
| 405 | # rpc GetCalendar(stream google.api.HttpBody) |
| 406 | # returns (stream google.api.HttpBody); |
| 407 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 408 | # returns (stream google.api.HttpBody); |
| 409 | # } |
| 410 | # |
| 411 | # Use of this type only changes how the request and response bodies are |
| 412 | # handled, all other features will continue to work unchanged. |
| 413 | "contentType": "A String", # The HTTP Content-Type string representing the content type of the body. |
| 414 | "data": "A String", # HTTP body binary data. |
| 415 | }</pre> |
| 416 | </div> |
| 417 | |
| 418 | </body></html> |