blob: 340d4e94ab48aed3a8f0079847c8be4234dc2b77 [file] [log] [blame]
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -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
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040075<h1><a href="ml_v1beta1.html">Google Cloud Machine Learning Engine</a> . <a href="ml_v1beta1.projects.html">projects</a> . <a href="ml_v1beta1.projects.models.html">models</a> . <a href="ml_v1beta1.projects.models.versions.html">versions</a></h1>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent=None, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new version of a model from a trained TensorFlow model.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a model version.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets information about a model version.</p>
86<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#list">list(parent=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070088<p class="firstline">Gets basic information about all the versions of a model.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#setDefault">setDefault(name=None, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Designates a version to be the default for the model.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(parent=None, body, x__xgafv=None)</code>
98 <pre>Creates a new version of a model from a trained TensorFlow model.
99
100If the version created in the cloud by this call is the first deployed
101version of the specified model, it will be made the default version of the
102model. When you add a version to a model that already has one or more
103versions, the default version does not automatically change. If you want a
104new version to be the default, you must call
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700105[projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106
107Args:
108 parent: string, Required. The name of the model.
109
110Authorization: requires `Editor` role on the parent project. (required)
111 body: object, The request body. (required)
112 The object takes the form of:
113
114{ # Represents a version of the model.
115 #
116 # Each version is a trained model deployed in the cloud, ready to handle
117 # prediction requests. A model can have multiple versions. You can get
118 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700119 # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700120 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400121 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
122 # If not set, Google Cloud ML will choose a version.
123 "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the
124 # model. If unset (i.e., by default), the number of nodes used to serve
125 # the model automatically scales with traffic. However, care should be
126 # taken to ramp up traffic according to the model's ability to scale. If
127 # your model needs to handle bursts of traffic beyond it's ability to
128 # scale, it is recommended you set this field appropriately.
129 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
130 # starting from the time the model is deployed, so the cost of operating
131 # this model will be proportional to nodes * number of hours since
132 # deployment.
133 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700134 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
135 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
136 # create the version. See the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700137 # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700138 # more informaiton.
139 #
140 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700141 # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700142 # the model service uses the specified location as the source of the model.
143 # Once deployed, the model version is hosted by the prediction service, so
144 # this location is useful only as a historical record.
145 "createTime": "A String", # Output only. The time the version was created.
146 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
147 # requests that do not specify a version.
148 #
149 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700150 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700151 "name": "A String", # Required.The name specified for the version when it was created.
152 #
153 # The version name must be unique within the model it is created in.
154}
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161Returns:
162 An object of the form:
163
164 { # This resource represents a long-running operation that is the result of a
165 # network API call.
Jon Wayne Parrottdc6c1ef2016-10-14 11:04:30 -0700166 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure or cancellation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700167 # programming environments, including REST APIs and RPC APIs. It is used by
168 # [gRPC](https://github.com/grpc). The error model is designed to be:
169 #
170 # - Simple to use and understand for most users
171 # - Flexible enough to meet unexpected needs
172 #
173 # # Overview
174 #
175 # The `Status` message contains three pieces of data: error code, error message,
176 # and error details. The error code should be an enum value of
177 # google.rpc.Code, but it may accept additional error codes if needed. The
178 # error message should be a developer-facing English message that helps
179 # developers *understand* and *resolve* the error. If a localized user-facing
180 # error message is needed, put the localized message in the error details or
181 # localize it in the client. The optional error details may contain arbitrary
182 # information about the error. There is a predefined set of error detail types
183 # in the package `google.rpc` which can be used for common error conditions.
184 #
185 # # Language mapping
186 #
187 # The `Status` message is the logical representation of the error model, but it
188 # is not necessarily the actual wire format. When the `Status` message is
189 # exposed in different client libraries and different wire protocols, it can be
190 # mapped differently. For example, it will likely be mapped to some exceptions
191 # in Java, but more likely mapped to some error codes in C.
192 #
193 # # Other uses
194 #
195 # The error model and the `Status` message can be used in a variety of
196 # environments, either with or without APIs, to provide a
197 # consistent developer experience across different environments.
198 #
199 # Example uses of this error model include:
200 #
201 # - Partial errors. If a service needs to return partial errors to the client,
202 # it may embed the `Status` in the normal response to indicate the partial
203 # errors.
204 #
205 # - Workflow errors. A typical workflow has multiple steps. Each step may
206 # have a `Status` message for error reporting purpose.
207 #
208 # - Batch operations. If a client uses batch request and batch response, the
209 # `Status` message should be used directly inside batch response, one for
210 # each error sub-response.
211 #
212 # - Asynchronous operations. If an API call embeds asynchronous operation
213 # results in its response, the status of those operations should be
214 # represented directly using the `Status` message.
215 #
216 # - Logging. If some API errors are stored in logs, the message `Status` could
217 # be used directly after any stripping needed for security/privacy reasons.
218 "message": "A String", # A developer-facing error message, which should be in English. Any
219 # user-facing error message should be localized and sent in the
220 # google.rpc.Status.details field, or localized by the client.
221 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
222 "details": [ # A list of messages that carry the error details. There will be a
223 # common set of message types for APIs to use.
224 {
225 "a_key": "", # Properties of the object. Contains field @type with type URL.
226 },
227 ],
228 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400229 "done": True or False, # If the value is `false`, it means the operation is still in progress.
230 # If true, the operation is completed, and either `error` or `response` is
231 # available.
232 "response": { # The normal response of the operation in case of success. If the original
233 # method returns no data on success, such as `Delete`, the response is
234 # `google.protobuf.Empty`. If the original method is standard
235 # `Get`/`Create`/`Update`, the response should be the resource. For other
236 # methods, the response should have the type `XxxResponse`, where `Xxx`
237 # is the original method name. For example, if the original method name
238 # is `TakeSnapshot()`, the inferred response type is
239 # `TakeSnapshotResponse`.
240 "a_key": "", # Properties of the object. Contains field @type with type URL.
241 },
242 "name": "A String", # The server-assigned name, which is only unique within the same service that
243 # originally returns it. If you use the default HTTP mapping, the
244 # `name` should have the format of `operations/some/unique/name`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700245 "metadata": { # Service-specific metadata associated with the operation. It typically
246 # contains progress information and common metadata such as create time.
247 # Some services might not provide such metadata. Any method that returns a
248 # long-running operation should document the metadata type, if any.
249 "a_key": "", # Properties of the object. Contains field @type with type URL.
250 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700251 }</pre>
252</div>
253
254<div class="method">
255 <code class="details" id="delete">delete(name=None, x__xgafv=None)</code>
256 <pre>Deletes a model version.
257
258Each model can have multiple versions deployed and in use at any given
259time. Use this method to remove a single version.
260
261Note: You cannot delete the version that is set as the default version
262of the model unless it is the only remaining version.
263
264Args:
265 name: string, Required. The name of the version. You can get the names of all the
266versions of a model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700267[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700268
269Authorization: requires `Editor` role on the parent project. (required)
270 x__xgafv: string, V1 error format.
271 Allowed values
272 1 - v1 error format
273 2 - v2 error format
274
275Returns:
276 An object of the form:
277
278 { # This resource represents a long-running operation that is the result of a
279 # network API call.
Jon Wayne Parrottdc6c1ef2016-10-14 11:04:30 -0700280 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure or cancellation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700281 # programming environments, including REST APIs and RPC APIs. It is used by
282 # [gRPC](https://github.com/grpc). The error model is designed to be:
283 #
284 # - Simple to use and understand for most users
285 # - Flexible enough to meet unexpected needs
286 #
287 # # Overview
288 #
289 # The `Status` message contains three pieces of data: error code, error message,
290 # and error details. The error code should be an enum value of
291 # google.rpc.Code, but it may accept additional error codes if needed. The
292 # error message should be a developer-facing English message that helps
293 # developers *understand* and *resolve* the error. If a localized user-facing
294 # error message is needed, put the localized message in the error details or
295 # localize it in the client. The optional error details may contain arbitrary
296 # information about the error. There is a predefined set of error detail types
297 # in the package `google.rpc` which can be used for common error conditions.
298 #
299 # # Language mapping
300 #
301 # The `Status` message is the logical representation of the error model, but it
302 # is not necessarily the actual wire format. When the `Status` message is
303 # exposed in different client libraries and different wire protocols, it can be
304 # mapped differently. For example, it will likely be mapped to some exceptions
305 # in Java, but more likely mapped to some error codes in C.
306 #
307 # # Other uses
308 #
309 # The error model and the `Status` message can be used in a variety of
310 # environments, either with or without APIs, to provide a
311 # consistent developer experience across different environments.
312 #
313 # Example uses of this error model include:
314 #
315 # - Partial errors. If a service needs to return partial errors to the client,
316 # it may embed the `Status` in the normal response to indicate the partial
317 # errors.
318 #
319 # - Workflow errors. A typical workflow has multiple steps. Each step may
320 # have a `Status` message for error reporting purpose.
321 #
322 # - Batch operations. If a client uses batch request and batch response, the
323 # `Status` message should be used directly inside batch response, one for
324 # each error sub-response.
325 #
326 # - Asynchronous operations. If an API call embeds asynchronous operation
327 # results in its response, the status of those operations should be
328 # represented directly using the `Status` message.
329 #
330 # - Logging. If some API errors are stored in logs, the message `Status` could
331 # be used directly after any stripping needed for security/privacy reasons.
332 "message": "A String", # A developer-facing error message, which should be in English. Any
333 # user-facing error message should be localized and sent in the
334 # google.rpc.Status.details field, or localized by the client.
335 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
336 "details": [ # A list of messages that carry the error details. There will be a
337 # common set of message types for APIs to use.
338 {
339 "a_key": "", # Properties of the object. Contains field @type with type URL.
340 },
341 ],
342 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400343 "done": True or False, # If the value is `false`, it means the operation is still in progress.
344 # If true, the operation is completed, and either `error` or `response` is
345 # available.
346 "response": { # The normal response of the operation in case of success. If the original
347 # method returns no data on success, such as `Delete`, the response is
348 # `google.protobuf.Empty`. If the original method is standard
349 # `Get`/`Create`/`Update`, the response should be the resource. For other
350 # methods, the response should have the type `XxxResponse`, where `Xxx`
351 # is the original method name. For example, if the original method name
352 # is `TakeSnapshot()`, the inferred response type is
353 # `TakeSnapshotResponse`.
354 "a_key": "", # Properties of the object. Contains field @type with type URL.
355 },
356 "name": "A String", # The server-assigned name, which is only unique within the same service that
357 # originally returns it. If you use the default HTTP mapping, the
358 # `name` should have the format of `operations/some/unique/name`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700359 "metadata": { # Service-specific metadata associated with the operation. It typically
360 # contains progress information and common metadata such as create time.
361 # Some services might not provide such metadata. Any method that returns a
362 # long-running operation should document the metadata type, if any.
363 "a_key": "", # Properties of the object. Contains field @type with type URL.
364 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700365 }</pre>
366</div>
367
368<div class="method">
369 <code class="details" id="get">get(name=None, x__xgafv=None)</code>
370 <pre>Gets information about a model version.
371
372Models can have multiple versions. You can call
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700373[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700374to get the same information that this method returns for all of the
375versions of a model.
376
377Args:
378 name: string, Required. The name of the version.
379
380Authorization: requires `Viewer` role on the parent project. (required)
381 x__xgafv: string, V1 error format.
382 Allowed values
383 1 - v1 error format
384 2 - v2 error format
385
386Returns:
387 An object of the form:
388
389 { # Represents a version of the model.
390 #
391 # Each version is a trained model deployed in the cloud, ready to handle
392 # prediction requests. A model can have multiple versions. You can get
393 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700394 # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700395 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400396 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
397 # If not set, Google Cloud ML will choose a version.
398 "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the
399 # model. If unset (i.e., by default), the number of nodes used to serve
400 # the model automatically scales with traffic. However, care should be
401 # taken to ramp up traffic according to the model's ability to scale. If
402 # your model needs to handle bursts of traffic beyond it's ability to
403 # scale, it is recommended you set this field appropriately.
404 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
405 # starting from the time the model is deployed, so the cost of operating
406 # this model will be proportional to nodes * number of hours since
407 # deployment.
408 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700409 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
410 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
411 # create the version. See the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700412 # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700413 # more informaiton.
414 #
415 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700416 # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700417 # the model service uses the specified location as the source of the model.
418 # Once deployed, the model version is hosted by the prediction service, so
419 # this location is useful only as a historical record.
420 "createTime": "A String", # Output only. The time the version was created.
421 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
422 # requests that do not specify a version.
423 #
424 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700425 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700426 "name": "A String", # Required.The name specified for the version when it was created.
427 #
428 # The version name must be unique within the model it is created in.
429 }</pre>
430</div>
431
432<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 <code class="details" id="list">list(parent=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700434 <pre>Gets basic information about all the versions of a model.
435
436If you expect that a model has a lot of versions, or if you need to handle
437only a limited number of results at a time, you can request that the list
438be retrieved in batches (called pages):
439
440Args:
441 parent: string, Required. The name of the model for which to list the version.
442
443Authorization: requires `Viewer` role on the parent project. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400444 pageSize: integer, Optional. The number of versions to retrieve per "page" of results. If
445there are more remaining results than this number, the response message
446will contain a valid value in the `next_page_token` field.
447
448The default value is 20, and the maximum page size is 100.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700449 pageToken: string, Optional. A page token to request the next page of results.
450
451You get the token from the `next_page_token` field of the response from
452the previous call.
453 x__xgafv: string, V1 error format.
454 Allowed values
455 1 - v1 error format
456 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700457
458Returns:
459 An object of the form:
460
461 { # Response message for the ListVersions method.
462 "nextPageToken": "A String", # Optional. Pass this token as the `page_token` field of the request for a
463 # subsequent call.
464 "versions": [ # The list of versions.
465 { # Represents a version of the model.
466 #
467 # Each version is a trained model deployed in the cloud, ready to handle
468 # prediction requests. A model can have multiple versions. You can get
469 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700470 # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700471 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400472 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
473 # If not set, Google Cloud ML will choose a version.
474 "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the
475 # model. If unset (i.e., by default), the number of nodes used to serve
476 # the model automatically scales with traffic. However, care should be
477 # taken to ramp up traffic according to the model's ability to scale. If
478 # your model needs to handle bursts of traffic beyond it's ability to
479 # scale, it is recommended you set this field appropriately.
480 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
481 # starting from the time the model is deployed, so the cost of operating
482 # this model will be proportional to nodes * number of hours since
483 # deployment.
484 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700485 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
486 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
487 # create the version. See the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700488 # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700489 # more informaiton.
490 #
491 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700492 # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700493 # the model service uses the specified location as the source of the model.
494 # Once deployed, the model version is hosted by the prediction service, so
495 # this location is useful only as a historical record.
496 "createTime": "A String", # Output only. The time the version was created.
497 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
498 # requests that do not specify a version.
499 #
500 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700501 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700502 "name": "A String", # Required.The name specified for the version when it was created.
503 #
504 # The version name must be unique within the model it is created in.
505 },
506 ],
507 }</pre>
508</div>
509
510<div class="method">
511 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
512 <pre>Retrieves the next page of results.
513
514Args:
515 previous_request: The request for the previous page. (required)
516 previous_response: The response from the request for the previous page. (required)
517
518Returns:
519 A request object that you can call 'execute()' on to request the next
520 page. Returns None if there are no more items in the collection.
521 </pre>
522</div>
523
524<div class="method">
525 <code class="details" id="setDefault">setDefault(name=None, body, x__xgafv=None)</code>
526 <pre>Designates a version to be the default for the model.
527
528The default version is used for prediction requests made against the model
529that don't specify a version.
530
531The first version to be created for a model is automatically set as the
532default. You must make any subsequent changes to the default version
533setting manually using this method.
534
535Args:
536 name: string, Required. The name of the version to make the default for the model. You
537can get the names of all the versions of a model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700538[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700539
540Authorization: requires `Editor` role on the parent project. (required)
541 body: object, The request body. (required)
542 The object takes the form of:
543
544{ # Request message for the SetDefaultVersion request.
545 }
546
547 x__xgafv: string, V1 error format.
548 Allowed values
549 1 - v1 error format
550 2 - v2 error format
551
552Returns:
553 An object of the form:
554
555 { # Represents a version of the model.
556 #
557 # Each version is a trained model deployed in the cloud, ready to handle
558 # prediction requests. A model can have multiple versions. You can get
559 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700560 # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700561 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400562 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
563 # If not set, Google Cloud ML will choose a version.
564 "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the
565 # model. If unset (i.e., by default), the number of nodes used to serve
566 # the model automatically scales with traffic. However, care should be
567 # taken to ramp up traffic according to the model's ability to scale. If
568 # your model needs to handle bursts of traffic beyond it's ability to
569 # scale, it is recommended you set this field appropriately.
570 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
571 # starting from the time the model is deployed, so the cost of operating
572 # this model will be proportional to nodes * number of hours since
573 # deployment.
574 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700575 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
576 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
577 # create the version. See the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700578 # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700579 # more informaiton.
580 #
581 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700582 # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700583 # the model service uses the specified location as the source of the model.
584 # Once deployed, the model version is hosted by the prediction service, so
585 # this location is useful only as a historical record.
586 "createTime": "A String", # Output only. The time the version was created.
587 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
588 # requests that do not specify a version.
589 #
590 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700591 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700592 "name": "A String", # Required.The name specified for the version when it was created.
593 #
594 # The version name must be unique within the model it is created in.
595 }</pre>
596</div>
597
598</body></html>