blob: 1df296a1730aaa7717ecbe9d44431b79e9e2ab3b [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="ml_v1.html">Google Cloud Machine Learning Engine</a> . <a href="ml_v1.projects.html">projects</a> . <a href="ml_v1.projects.models.html">models</a> . <a href="ml_v1.projects.models.versions.html">versions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070078 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline">Creates a new version of a model from a trained TensorFlow model.</p>
80<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040082<p class="firstline">Deletes a model version.</p>
83<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Gets information about a model version.</p>
86<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040087 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040088<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">
Thomas Coffee2f245372017-03-27 10:39:26 -070093 <code><a href="#setDefault">setDefault(name, body, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040094<p class="firstline">Designates a version to be the default for the model.</p>
95<h3>Method Details</h3>
96<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -070097 <code class="details" id="create">create(parent, body, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040098 <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/v1/projects.models.versions/setDefault).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106
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/v1/projects.models.versions/list).
Thomas Coffee2f245372017-03-27 10:39:26 -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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400123 "manualScaling": { # Options for manually scaling a model. # Manually select the number of nodes to use for serving the
124 # model. You should generally use `automatic_scaling` with an appropriate
125 # `min_nodes` instead, but this option is available if you want more
126 # predictable billing. Beware that latency and error rates will increase
127 # if the traffic exceeds that capability of the system to serve it based
128 # on the selected number of nodes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 "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
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400131 # this model will be proportional to `nodes` * number of hours since
132 # last billing cycle plus the cost for each prediction performed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400133 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
135 # create the version. See the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400136 # [overview of model
137 # deployment](/ml-engine/docs/concepts/deployment-overview) for more
138 # informaiton.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400139 #
140 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700141 # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400142 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400145 # The total number of model files can't exceed 1000.
146 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
147 "automaticScaling": { # Options for automatically scaling a model. # Automatically scale the number of nodes used to serve the model in
148 # response to increases and decreases in traffic. Care should be
149 # taken to ramp up traffic according to the model's ability to scale
150 # or you will start seeing increases in latency and 429 response codes.
151 "minNodes": 42, # Optional. The minimum number of nodes to allocate for this model. These
152 # nodes are always up, starting from the time the model is deployed, so the
153 # cost of operating this model will be at least
154 # `rate` * `min_nodes` * number of hours since last billing cycle,
155 # where `rate` is the cost per node-hour as documented in
156 # [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),
157 # even if no predictions are performed. There is additional cost for each
158 # prediction performed.
159 #
160 # Unlike manual scaling, if the load gets too heavy for the nodes
161 # that are up, the service will automatically add nodes to handle the
162 # increased load as well as scale back as traffic drops, always maintaining
163 # at least `min_nodes`. You will be charged for the time in which additional
164 # nodes are used.
165 #
166 # If not specified, `min_nodes` defaults to 0, in which case, when traffic
167 # to a model stops (and after a cool-down period), nodes will be shut down
168 # and no charges will be incurred until traffic to the model resumes.
169 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400170 "createTime": "A String", # Output only. The time the version was created.
171 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
172 # requests that do not specify a version.
173 #
174 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700175 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).
Thomas Coffee2f245372017-03-27 10:39:26 -0700176 "name": "A String", # Required.The name specified for the version when it was created.
177 #
178 # The version name must be unique within the model it is created in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400179}
180
181 x__xgafv: string, V1 error format.
182 Allowed values
183 1 - v1 error format
184 2 - v2 error format
185
186Returns:
187 An object of the form:
188
189 { # This resource represents a long-running operation that is the result of a
190 # network API call.
Thomas Coffee2f245372017-03-27 10:39:26 -0700191 "metadata": { # Service-specific metadata associated with the operation. It typically
192 # contains progress information and common metadata such as create time.
193 # Some services might not provide such metadata. Any method that returns a
194 # long-running operation should document the metadata type, if any.
195 "a_key": "", # Properties of the object. Contains field @type with type URL.
196 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 "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.
198 # programming environments, including REST APIs and RPC APIs. It is used by
199 # [gRPC](https://github.com/grpc). The error model is designed to be:
200 #
201 # - Simple to use and understand for most users
202 # - Flexible enough to meet unexpected needs
203 #
204 # # Overview
205 #
206 # The `Status` message contains three pieces of data: error code, error message,
207 # and error details. The error code should be an enum value of
208 # google.rpc.Code, but it may accept additional error codes if needed. The
209 # error message should be a developer-facing English message that helps
210 # developers *understand* and *resolve* the error. If a localized user-facing
211 # error message is needed, put the localized message in the error details or
212 # localize it in the client. The optional error details may contain arbitrary
213 # information about the error. There is a predefined set of error detail types
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400214 # in the package `google.rpc` that can be used for common error conditions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400215 #
216 # # Language mapping
217 #
218 # The `Status` message is the logical representation of the error model, but it
219 # is not necessarily the actual wire format. When the `Status` message is
220 # exposed in different client libraries and different wire protocols, it can be
221 # mapped differently. For example, it will likely be mapped to some exceptions
222 # in Java, but more likely mapped to some error codes in C.
223 #
224 # # Other uses
225 #
226 # The error model and the `Status` message can be used in a variety of
227 # environments, either with or without APIs, to provide a
228 # consistent developer experience across different environments.
229 #
230 # Example uses of this error model include:
231 #
232 # - Partial errors. If a service needs to return partial errors to the client,
233 # it may embed the `Status` in the normal response to indicate the partial
234 # errors.
235 #
236 # - Workflow errors. A typical workflow has multiple steps. Each step may
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400237 # have a `Status` message for error reporting.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400238 #
239 # - Batch operations. If a client uses batch request and batch response, the
240 # `Status` message should be used directly inside batch response, one for
241 # each error sub-response.
242 #
243 # - Asynchronous operations. If an API call embeds asynchronous operation
244 # results in its response, the status of those operations should be
245 # represented directly using the `Status` message.
246 #
247 # - Logging. If some API errors are stored in logs, the message `Status` could
248 # be used directly after any stripping needed for security/privacy reasons.
249 "message": "A String", # A developer-facing error message, which should be in English. Any
250 # user-facing error message should be localized and sent in the
251 # google.rpc.Status.details field, or localized by the client.
252 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
253 "details": [ # A list of messages that carry the error details. There will be a
254 # common set of message types for APIs to use.
255 {
256 "a_key": "", # Properties of the object. Contains field @type with type URL.
257 },
258 ],
259 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400260 "done": True or False, # If the value is `false`, it means the operation is still in progress.
261 # If true, the operation is completed, and either `error` or `response` is
262 # available.
263 "response": { # The normal response of the operation in case of success. If the original
264 # method returns no data on success, such as `Delete`, the response is
265 # `google.protobuf.Empty`. If the original method is standard
266 # `Get`/`Create`/`Update`, the response should be the resource. For other
267 # methods, the response should have the type `XxxResponse`, where `Xxx`
268 # is the original method name. For example, if the original method name
269 # is `TakeSnapshot()`, the inferred response type is
270 # `TakeSnapshotResponse`.
271 "a_key": "", # Properties of the object. Contains field @type with type URL.
272 },
273 "name": "A String", # The server-assigned name, which is only unique within the same service that
274 # originally returns it. If you use the default HTTP mapping, the
275 # `name` should have the format of `operations/some/unique/name`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 }</pre>
277</div>
278
279<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700280 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400281 <pre>Deletes a model version.
282
283Each model can have multiple versions deployed and in use at any given
284time. Use this method to remove a single version.
285
286Note: You cannot delete the version that is set as the default version
287of the model unless it is the only remaining version.
288
289Args:
290 name: string, Required. The name of the version. You can get the names of all the
291versions of a model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700292[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400293
294Authorization: requires `Editor` role on the parent project. (required)
295 x__xgafv: string, V1 error format.
296 Allowed values
297 1 - v1 error format
298 2 - v2 error format
299
300Returns:
301 An object of the form:
302
303 { # This resource represents a long-running operation that is the result of a
304 # network API call.
Thomas Coffee2f245372017-03-27 10:39:26 -0700305 "metadata": { # Service-specific metadata associated with the operation. It typically
306 # contains progress information and common metadata such as create time.
307 # Some services might not provide such metadata. Any method that returns a
308 # long-running operation should document the metadata type, if any.
309 "a_key": "", # Properties of the object. Contains field @type with type URL.
310 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400311 "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.
312 # programming environments, including REST APIs and RPC APIs. It is used by
313 # [gRPC](https://github.com/grpc). The error model is designed to be:
314 #
315 # - Simple to use and understand for most users
316 # - Flexible enough to meet unexpected needs
317 #
318 # # Overview
319 #
320 # The `Status` message contains three pieces of data: error code, error message,
321 # and error details. The error code should be an enum value of
322 # google.rpc.Code, but it may accept additional error codes if needed. The
323 # error message should be a developer-facing English message that helps
324 # developers *understand* and *resolve* the error. If a localized user-facing
325 # error message is needed, put the localized message in the error details or
326 # localize it in the client. The optional error details may contain arbitrary
327 # information about the error. There is a predefined set of error detail types
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400328 # in the package `google.rpc` that can be used for common error conditions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400329 #
330 # # Language mapping
331 #
332 # The `Status` message is the logical representation of the error model, but it
333 # is not necessarily the actual wire format. When the `Status` message is
334 # exposed in different client libraries and different wire protocols, it can be
335 # mapped differently. For example, it will likely be mapped to some exceptions
336 # in Java, but more likely mapped to some error codes in C.
337 #
338 # # Other uses
339 #
340 # The error model and the `Status` message can be used in a variety of
341 # environments, either with or without APIs, to provide a
342 # consistent developer experience across different environments.
343 #
344 # Example uses of this error model include:
345 #
346 # - Partial errors. If a service needs to return partial errors to the client,
347 # it may embed the `Status` in the normal response to indicate the partial
348 # errors.
349 #
350 # - Workflow errors. A typical workflow has multiple steps. Each step may
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400351 # have a `Status` message for error reporting.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400352 #
353 # - Batch operations. If a client uses batch request and batch response, the
354 # `Status` message should be used directly inside batch response, one for
355 # each error sub-response.
356 #
357 # - Asynchronous operations. If an API call embeds asynchronous operation
358 # results in its response, the status of those operations should be
359 # represented directly using the `Status` message.
360 #
361 # - Logging. If some API errors are stored in logs, the message `Status` could
362 # be used directly after any stripping needed for security/privacy reasons.
363 "message": "A String", # A developer-facing error message, which should be in English. Any
364 # user-facing error message should be localized and sent in the
365 # google.rpc.Status.details field, or localized by the client.
366 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
367 "details": [ # A list of messages that carry the error details. There will be a
368 # common set of message types for APIs to use.
369 {
370 "a_key": "", # Properties of the object. Contains field @type with type URL.
371 },
372 ],
373 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400374 "done": True or False, # If the value is `false`, it means the operation is still in progress.
375 # If true, the operation is completed, and either `error` or `response` is
376 # available.
377 "response": { # The normal response of the operation in case of success. If the original
378 # method returns no data on success, such as `Delete`, the response is
379 # `google.protobuf.Empty`. If the original method is standard
380 # `Get`/`Create`/`Update`, the response should be the resource. For other
381 # methods, the response should have the type `XxxResponse`, where `Xxx`
382 # is the original method name. For example, if the original method name
383 # is `TakeSnapshot()`, the inferred response type is
384 # `TakeSnapshotResponse`.
385 "a_key": "", # Properties of the object. Contains field @type with type URL.
386 },
387 "name": "A String", # The server-assigned name, which is only unique within the same service that
388 # originally returns it. If you use the default HTTP mapping, the
389 # `name` should have the format of `operations/some/unique/name`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400390 }</pre>
391</div>
392
393<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700394 <code class="details" id="get">get(name, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 <pre>Gets information about a model version.
396
397Models can have multiple versions. You can call
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700398[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400399to get the same information that this method returns for all of the
400versions of a model.
401
402Args:
403 name: string, Required. The name of the version.
404
405Authorization: requires `Viewer` role on the parent project. (required)
406 x__xgafv: string, V1 error format.
407 Allowed values
408 1 - v1 error format
409 2 - v2 error format
410
411Returns:
412 An object of the form:
413
414 { # Represents a version of the model.
415 #
416 # Each version is a trained model deployed in the cloud, ready to handle
417 # prediction requests. A model can have multiple versions. You can get
418 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700419 # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).
Thomas Coffee2f245372017-03-27 10:39:26 -0700420 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400421 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
422 # If not set, Google Cloud ML will choose a version.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400423 "manualScaling": { # Options for manually scaling a model. # Manually select the number of nodes to use for serving the
424 # model. You should generally use `automatic_scaling` with an appropriate
425 # `min_nodes` instead, but this option is available if you want more
426 # predictable billing. Beware that latency and error rates will increase
427 # if the traffic exceeds that capability of the system to serve it based
428 # on the selected number of nodes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400429 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
430 # starting from the time the model is deployed, so the cost of operating
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400431 # this model will be proportional to `nodes` * number of hours since
432 # last billing cycle plus the cost for each prediction performed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400434 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
435 # create the version. See the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400436 # [overview of model
437 # deployment](/ml-engine/docs/concepts/deployment-overview) for more
438 # informaiton.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400439 #
440 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700441 # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400442 # the model service uses the specified location as the source of the model.
443 # Once deployed, the model version is hosted by the prediction service, so
444 # this location is useful only as a historical record.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400445 # The total number of model files can't exceed 1000.
446 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
447 "automaticScaling": { # Options for automatically scaling a model. # Automatically scale the number of nodes used to serve the model in
448 # response to increases and decreases in traffic. Care should be
449 # taken to ramp up traffic according to the model's ability to scale
450 # or you will start seeing increases in latency and 429 response codes.
451 "minNodes": 42, # Optional. The minimum number of nodes to allocate for this model. These
452 # nodes are always up, starting from the time the model is deployed, so the
453 # cost of operating this model will be at least
454 # `rate` * `min_nodes` * number of hours since last billing cycle,
455 # where `rate` is the cost per node-hour as documented in
456 # [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),
457 # even if no predictions are performed. There is additional cost for each
458 # prediction performed.
459 #
460 # Unlike manual scaling, if the load gets too heavy for the nodes
461 # that are up, the service will automatically add nodes to handle the
462 # increased load as well as scale back as traffic drops, always maintaining
463 # at least `min_nodes`. You will be charged for the time in which additional
464 # nodes are used.
465 #
466 # If not specified, `min_nodes` defaults to 0, in which case, when traffic
467 # to a model stops (and after a cool-down period), nodes will be shut down
468 # and no charges will be incurred until traffic to the model resumes.
469 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400470 "createTime": "A String", # Output only. The time the version was created.
471 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
472 # requests that do not specify a version.
473 #
474 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700475 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).
Thomas Coffee2f245372017-03-27 10:39:26 -0700476 "name": "A String", # Required.The name specified for the version when it was created.
477 #
478 # The version name must be unique within the model it is created in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400479 }</pre>
480</div>
481
482<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400483 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400484 <pre>Gets basic information about all the versions of a model.
485
486If you expect that a model has a lot of versions, or if you need to handle
487only a limited number of results at a time, you can request that the list
488be retrieved in batches (called pages):
489
490Args:
491 parent: string, Required. The name of the model for which to list the version.
492
493Authorization: requires `Viewer` role on the parent project. (required)
494 pageToken: string, Optional. A page token to request the next page of results.
495
496You get the token from the `next_page_token` field of the response from
497the previous call.
498 x__xgafv: string, V1 error format.
499 Allowed values
500 1 - v1 error format
501 2 - v2 error format
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400502 pageSize: integer, Optional. The number of versions to retrieve per "page" of results. If
503there are more remaining results than this number, the response message
504will contain a valid value in the `next_page_token` field.
505
506The default value is 20, and the maximum page size is 100.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400507
508Returns:
509 An object of the form:
510
511 { # Response message for the ListVersions method.
512 "nextPageToken": "A String", # Optional. Pass this token as the `page_token` field of the request for a
513 # subsequent call.
514 "versions": [ # The list of versions.
515 { # Represents a version of the model.
516 #
517 # Each version is a trained model deployed in the cloud, ready to handle
518 # prediction requests. A model can have multiple versions. You can get
519 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700520 # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).
Thomas Coffee2f245372017-03-27 10:39:26 -0700521 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400522 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
523 # If not set, Google Cloud ML will choose a version.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400524 "manualScaling": { # Options for manually scaling a model. # Manually select the number of nodes to use for serving the
525 # model. You should generally use `automatic_scaling` with an appropriate
526 # `min_nodes` instead, but this option is available if you want more
527 # predictable billing. Beware that latency and error rates will increase
528 # if the traffic exceeds that capability of the system to serve it based
529 # on the selected number of nodes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400530 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
531 # starting from the time the model is deployed, so the cost of operating
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400532 # this model will be proportional to `nodes` * number of hours since
533 # last billing cycle plus the cost for each prediction performed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400534 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400535 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
536 # create the version. See the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400537 # [overview of model
538 # deployment](/ml-engine/docs/concepts/deployment-overview) for more
539 # informaiton.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400540 #
541 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700542 # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400543 # the model service uses the specified location as the source of the model.
544 # Once deployed, the model version is hosted by the prediction service, so
545 # this location is useful only as a historical record.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400546 # The total number of model files can't exceed 1000.
547 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
548 "automaticScaling": { # Options for automatically scaling a model. # Automatically scale the number of nodes used to serve the model in
549 # response to increases and decreases in traffic. Care should be
550 # taken to ramp up traffic according to the model's ability to scale
551 # or you will start seeing increases in latency and 429 response codes.
552 "minNodes": 42, # Optional. The minimum number of nodes to allocate for this model. These
553 # nodes are always up, starting from the time the model is deployed, so the
554 # cost of operating this model will be at least
555 # `rate` * `min_nodes` * number of hours since last billing cycle,
556 # where `rate` is the cost per node-hour as documented in
557 # [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),
558 # even if no predictions are performed. There is additional cost for each
559 # prediction performed.
560 #
561 # Unlike manual scaling, if the load gets too heavy for the nodes
562 # that are up, the service will automatically add nodes to handle the
563 # increased load as well as scale back as traffic drops, always maintaining
564 # at least `min_nodes`. You will be charged for the time in which additional
565 # nodes are used.
566 #
567 # If not specified, `min_nodes` defaults to 0, in which case, when traffic
568 # to a model stops (and after a cool-down period), nodes will be shut down
569 # and no charges will be incurred until traffic to the model resumes.
570 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400571 "createTime": "A String", # Output only. The time the version was created.
572 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
573 # requests that do not specify a version.
574 #
575 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700576 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).
Thomas Coffee2f245372017-03-27 10:39:26 -0700577 "name": "A String", # Required.The name specified for the version when it was created.
578 #
579 # The version name must be unique within the model it is created in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400580 },
581 ],
582 }</pre>
583</div>
584
585<div class="method">
586 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
587 <pre>Retrieves the next page of results.
588
589Args:
590 previous_request: The request for the previous page. (required)
591 previous_response: The response from the request for the previous page. (required)
592
593Returns:
594 A request object that you can call 'execute()' on to request the next
595 page. Returns None if there are no more items in the collection.
596 </pre>
597</div>
598
599<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700600 <code class="details" id="setDefault">setDefault(name, body, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400601 <pre>Designates a version to be the default for the model.
602
603The default version is used for prediction requests made against the model
604that don't specify a version.
605
606The first version to be created for a model is automatically set as the
607default. You must make any subsequent changes to the default version
608setting manually using this method.
609
610Args:
611 name: string, Required. The name of the version to make the default for the model. You
612can get the names of all the versions of a model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700613[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400614
615Authorization: requires `Editor` role on the parent project. (required)
616 body: object, The request body. (required)
617 The object takes the form of:
618
619{ # Request message for the SetDefaultVersion request.
620 }
621
622 x__xgafv: string, V1 error format.
623 Allowed values
624 1 - v1 error format
625 2 - v2 error format
626
627Returns:
628 An object of the form:
629
630 { # Represents a version of the model.
631 #
632 # Each version is a trained model deployed in the cloud, ready to handle
633 # prediction requests. A model can have multiple versions. You can get
634 # information about all of the versions of a given model by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700635 # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).
Thomas Coffee2f245372017-03-27 10:39:26 -0700636 "description": "A String", # Optional. The description specified for the version when it was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400637 "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment.
638 # If not set, Google Cloud ML will choose a version.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400639 "manualScaling": { # Options for manually scaling a model. # Manually select the number of nodes to use for serving the
640 # model. You should generally use `automatic_scaling` with an appropriate
641 # `min_nodes` instead, but this option is available if you want more
642 # predictable billing. Beware that latency and error rates will increase
643 # if the traffic exceeds that capability of the system to serve it based
644 # on the selected number of nodes.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400645 "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up,
646 # starting from the time the model is deployed, so the cost of operating
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400647 # this model will be proportional to `nodes` * number of hours since
648 # last billing cycle plus the cost for each prediction performed.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400649 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400650 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
651 # create the version. See the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400652 # [overview of model
653 # deployment](/ml-engine/docs/concepts/deployment-overview) for more
654 # informaiton.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400655 #
656 # When passing Version to
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700657 # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400658 # the model service uses the specified location as the source of the model.
659 # Once deployed, the model version is hosted by the prediction service, so
660 # this location is useful only as a historical record.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400661 # The total number of model files can't exceed 1000.
662 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
663 "automaticScaling": { # Options for automatically scaling a model. # Automatically scale the number of nodes used to serve the model in
664 # response to increases and decreases in traffic. Care should be
665 # taken to ramp up traffic according to the model's ability to scale
666 # or you will start seeing increases in latency and 429 response codes.
667 "minNodes": 42, # Optional. The minimum number of nodes to allocate for this model. These
668 # nodes are always up, starting from the time the model is deployed, so the
669 # cost of operating this model will be at least
670 # `rate` * `min_nodes` * number of hours since last billing cycle,
671 # where `rate` is the cost per node-hour as documented in
672 # [pricing](https://cloud.google.com/ml-engine/pricing#prediction_pricing),
673 # even if no predictions are performed. There is additional cost for each
674 # prediction performed.
675 #
676 # Unlike manual scaling, if the load gets too heavy for the nodes
677 # that are up, the service will automatically add nodes to handle the
678 # increased load as well as scale back as traffic drops, always maintaining
679 # at least `min_nodes`. You will be charged for the time in which additional
680 # nodes are used.
681 #
682 # If not specified, `min_nodes` defaults to 0, in which case, when traffic
683 # to a model stops (and after a cool-down period), nodes will be shut down
684 # and no charges will be incurred until traffic to the model resumes.
685 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400686 "createTime": "A String", # Output only. The time the version was created.
687 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
688 # requests that do not specify a version.
689 #
690 # You can change the default version by calling
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700691 # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).
Thomas Coffee2f245372017-03-27 10:39:26 -0700692 "name": "A String", # Required.The name specified for the version when it was created.
693 #
694 # The version name must be unique within the model it is created in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 }</pre>
696</div>
697
698</body></html>