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> . <a href="ml_v1.projects.models.html">models</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="ml_v1.projects.models.versions.html">versions()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the versions Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 83 | <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 84 | <p class="firstline">Creates a model which will later contain one or more versions.</p> |
| 85 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 86 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 87 | <p class="firstline">Deletes a model.</p> |
| 88 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 89 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 90 | <p class="firstline">Gets information about a model, including its name, the description (if</p> |
| 91 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 92 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 93 | <p class="firstline">Lists the models in a project.</p> |
| 94 | <p class="toc_element"> |
| 95 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 96 | <p class="firstline">Retrieves the next page of results.</p> |
| 97 | <h3>Method Details</h3> |
| 98 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 99 | <code class="details" id="create">create(parent, body, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 100 | <pre>Creates a model which will later contain one or more versions. |
| 101 | |
| 102 | You must add at least one version before you can request predictions from |
| 103 | the model. Add versions by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 104 | [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 105 | |
| 106 | Args: |
| 107 | parent: string, Required. The project name. |
| 108 | |
| 109 | Authorization: requires `Editor` role on the specified project. (required) |
| 110 | body: object, The request body. (required) |
| 111 | The object takes the form of: |
| 112 | |
| 113 | { # Represents a machine learning solution. |
| 114 | # |
| 115 | # A model can have multiple versions, each of which is a deployed, trained |
| 116 | # model ready to receive prediction requests. The model itself is just a |
| 117 | # container. |
| 118 | "regions": [ # Optional. The list of regions where the model is going to be deployed. |
| 119 | # Currently only one region per model is supported. |
| 120 | # Defaults to 'us-central1' if nothing is set. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 121 | # Note: |
| 122 | # * No matter where a model is deployed, it can always be accessed by |
| 123 | # users from anywhere, both for online and batch prediction. |
| 124 | # * The region for a batch prediction job is set by the region field when |
| 125 | # submitting the batch prediction job and does not take its value from |
| 126 | # this field. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 127 | "A String", |
| 128 | ], |
| 129 | "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to |
| 130 | # handle prediction requests that do not specify a version. |
| 131 | # |
| 132 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 133 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 134 | # |
| 135 | # Each version is a trained model deployed in the cloud, ready to handle |
| 136 | # prediction requests. A model can have multiple versions. You can get |
| 137 | # information about all of the versions of a given model by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 138 | # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 139 | "description": "A String", # Optional. The description specified for the version when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 140 | "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment. |
| 141 | # If not set, Google Cloud ML will choose a version. |
| 142 | "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the |
| 143 | # model. If unset (i.e., by default), the number of nodes used to serve |
| 144 | # the model automatically scales with traffic. However, care should be |
| 145 | # taken to ramp up traffic according to the model's ability to scale. If |
| 146 | # your model needs to handle bursts of traffic beyond it's ability to |
| 147 | # scale, it is recommended you set this field appropriately. |
| 148 | "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up, |
| 149 | # starting from the time the model is deployed, so the cost of operating |
| 150 | # this model will be proportional to nodes * number of hours since |
| 151 | # deployment. |
| 152 | }, |
| 153 | "lastUseTime": "A String", # Output only. The time the version was last used for prediction. |
| 154 | "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to |
| 155 | # create the version. See the |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 156 | # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 157 | # more informaiton. |
| 158 | # |
| 159 | # When passing Version to |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 160 | # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 161 | # the model service uses the specified location as the source of the model. |
| 162 | # Once deployed, the model version is hosted by the prediction service, so |
| 163 | # this location is useful only as a historical record. |
| 164 | "createTime": "A String", # Output only. The time the version was created. |
| 165 | "isDefault": True or False, # Output only. If true, this version will be used to handle prediction |
| 166 | # requests that do not specify a version. |
| 167 | # |
| 168 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 169 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 170 | "name": "A String", # Required.The name specified for the version when it was created. |
| 171 | # |
| 172 | # The version name must be unique within the model it is created in. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 173 | }, |
| 174 | "name": "A String", # Required. The name specified for the model when it was created. |
| 175 | # |
| 176 | # The model name must be unique within the project it is created in. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 177 | "onlinePredictionLogging": True or False, # Optional. If true, enables StackDriver Logging for online prediction. |
| 178 | # Default is false. |
| 179 | "description": "A String", # Optional. The description specified for the model when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | x__xgafv: string, V1 error format. |
| 183 | Allowed values |
| 184 | 1 - v1 error format |
| 185 | 2 - v2 error format |
| 186 | |
| 187 | Returns: |
| 188 | An object of the form: |
| 189 | |
| 190 | { # Represents a machine learning solution. |
| 191 | # |
| 192 | # A model can have multiple versions, each of which is a deployed, trained |
| 193 | # model ready to receive prediction requests. The model itself is just a |
| 194 | # container. |
| 195 | "regions": [ # Optional. The list of regions where the model is going to be deployed. |
| 196 | # Currently only one region per model is supported. |
| 197 | # Defaults to 'us-central1' if nothing is set. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 198 | # Note: |
| 199 | # * No matter where a model is deployed, it can always be accessed by |
| 200 | # users from anywhere, both for online and batch prediction. |
| 201 | # * The region for a batch prediction job is set by the region field when |
| 202 | # submitting the batch prediction job and does not take its value from |
| 203 | # this field. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 204 | "A String", |
| 205 | ], |
| 206 | "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to |
| 207 | # handle prediction requests that do not specify a version. |
| 208 | # |
| 209 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 210 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 211 | # |
| 212 | # Each version is a trained model deployed in the cloud, ready to handle |
| 213 | # prediction requests. A model can have multiple versions. You can get |
| 214 | # information about all of the versions of a given model by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 215 | # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 216 | "description": "A String", # Optional. The description specified for the version when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 217 | "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment. |
| 218 | # If not set, Google Cloud ML will choose a version. |
| 219 | "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the |
| 220 | # model. If unset (i.e., by default), the number of nodes used to serve |
| 221 | # the model automatically scales with traffic. However, care should be |
| 222 | # taken to ramp up traffic according to the model's ability to scale. If |
| 223 | # your model needs to handle bursts of traffic beyond it's ability to |
| 224 | # scale, it is recommended you set this field appropriately. |
| 225 | "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up, |
| 226 | # starting from the time the model is deployed, so the cost of operating |
| 227 | # this model will be proportional to nodes * number of hours since |
| 228 | # deployment. |
| 229 | }, |
| 230 | "lastUseTime": "A String", # Output only. The time the version was last used for prediction. |
| 231 | "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to |
| 232 | # create the version. See the |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 233 | # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 234 | # more informaiton. |
| 235 | # |
| 236 | # When passing Version to |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 237 | # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 238 | # the model service uses the specified location as the source of the model. |
| 239 | # Once deployed, the model version is hosted by the prediction service, so |
| 240 | # this location is useful only as a historical record. |
| 241 | "createTime": "A String", # Output only. The time the version was created. |
| 242 | "isDefault": True or False, # Output only. If true, this version will be used to handle prediction |
| 243 | # requests that do not specify a version. |
| 244 | # |
| 245 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 246 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 247 | "name": "A String", # Required.The name specified for the version when it was created. |
| 248 | # |
| 249 | # The version name must be unique within the model it is created in. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 250 | }, |
| 251 | "name": "A String", # Required. The name specified for the model when it was created. |
| 252 | # |
| 253 | # The model name must be unique within the project it is created in. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 254 | "onlinePredictionLogging": True or False, # Optional. If true, enables StackDriver Logging for online prediction. |
| 255 | # Default is false. |
| 256 | "description": "A String", # Optional. The description specified for the model when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 257 | }</pre> |
| 258 | </div> |
| 259 | |
| 260 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 261 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 262 | <pre>Deletes a model. |
| 263 | |
| 264 | You can only delete a model if there are no versions in it. You can delete |
| 265 | versions by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 266 | [projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.models.versions/delete). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 267 | |
| 268 | Args: |
| 269 | name: string, Required. The name of the model. |
| 270 | |
| 271 | Authorization: requires `Editor` role on the parent project. (required) |
| 272 | x__xgafv: string, V1 error format. |
| 273 | Allowed values |
| 274 | 1 - v1 error format |
| 275 | 2 - v2 error format |
| 276 | |
| 277 | Returns: |
| 278 | An object of the form: |
| 279 | |
| 280 | { # This resource represents a long-running operation that is the result of a |
| 281 | # network API call. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 282 | "response": { # The normal response of the operation in case of success. If the original |
| 283 | # method returns no data on success, such as `Delete`, the response is |
| 284 | # `google.protobuf.Empty`. If the original method is standard |
| 285 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 286 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 287 | # is the original method name. For example, if the original method name |
| 288 | # is `TakeSnapshot()`, the inferred response type is |
| 289 | # `TakeSnapshotResponse`. |
| 290 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 291 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 292 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 293 | # contains progress information and common metadata such as create time. |
| 294 | # Some services might not provide such metadata. Any method that returns a |
| 295 | # long-running operation should document the metadata type, if any. |
| 296 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 297 | }, |
| 298 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 299 | # If true, the operation is completed, and either `error` or `response` is |
| 300 | # available. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 301 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 302 | # originally returns it. If you use the default HTTP mapping, the |
| 303 | # `name` should have the format of `operations/some/unique/name`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 304 | "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. |
| 305 | # programming environments, including REST APIs and RPC APIs. It is used by |
| 306 | # [gRPC](https://github.com/grpc). The error model is designed to be: |
| 307 | # |
| 308 | # - Simple to use and understand for most users |
| 309 | # - Flexible enough to meet unexpected needs |
| 310 | # |
| 311 | # # Overview |
| 312 | # |
| 313 | # The `Status` message contains three pieces of data: error code, error message, |
| 314 | # and error details. The error code should be an enum value of |
| 315 | # google.rpc.Code, but it may accept additional error codes if needed. The |
| 316 | # error message should be a developer-facing English message that helps |
| 317 | # developers *understand* and *resolve* the error. If a localized user-facing |
| 318 | # error message is needed, put the localized message in the error details or |
| 319 | # localize it in the client. The optional error details may contain arbitrary |
| 320 | # information about the error. There is a predefined set of error detail types |
| 321 | # in the package `google.rpc` which can be used for common error conditions. |
| 322 | # |
| 323 | # # Language mapping |
| 324 | # |
| 325 | # The `Status` message is the logical representation of the error model, but it |
| 326 | # is not necessarily the actual wire format. When the `Status` message is |
| 327 | # exposed in different client libraries and different wire protocols, it can be |
| 328 | # mapped differently. For example, it will likely be mapped to some exceptions |
| 329 | # in Java, but more likely mapped to some error codes in C. |
| 330 | # |
| 331 | # # Other uses |
| 332 | # |
| 333 | # The error model and the `Status` message can be used in a variety of |
| 334 | # environments, either with or without APIs, to provide a |
| 335 | # consistent developer experience across different environments. |
| 336 | # |
| 337 | # Example uses of this error model include: |
| 338 | # |
| 339 | # - Partial errors. If a service needs to return partial errors to the client, |
| 340 | # it may embed the `Status` in the normal response to indicate the partial |
| 341 | # errors. |
| 342 | # |
| 343 | # - Workflow errors. A typical workflow has multiple steps. Each step may |
| 344 | # have a `Status` message for error reporting purpose. |
| 345 | # |
| 346 | # - Batch operations. If a client uses batch request and batch response, the |
| 347 | # `Status` message should be used directly inside batch response, one for |
| 348 | # each error sub-response. |
| 349 | # |
| 350 | # - Asynchronous operations. If an API call embeds asynchronous operation |
| 351 | # results in its response, the status of those operations should be |
| 352 | # represented directly using the `Status` message. |
| 353 | # |
| 354 | # - Logging. If some API errors are stored in logs, the message `Status` could |
| 355 | # be used directly after any stripping needed for security/privacy reasons. |
| 356 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 357 | # user-facing error message should be localized and sent in the |
| 358 | # google.rpc.Status.details field, or localized by the client. |
| 359 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 360 | "details": [ # A list of messages that carry the error details. There will be a |
| 361 | # common set of message types for APIs to use. |
| 362 | { |
| 363 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 364 | }, |
| 365 | ], |
| 366 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 367 | }</pre> |
| 368 | </div> |
| 369 | |
| 370 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 371 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 372 | <pre>Gets information about a model, including its name, the description (if |
| 373 | set), and the default version (if at least one version of the model has |
| 374 | been deployed). |
| 375 | |
| 376 | Args: |
| 377 | name: string, Required. The name of the model. |
| 378 | |
| 379 | Authorization: requires `Viewer` role on the parent project. (required) |
| 380 | x__xgafv: string, V1 error format. |
| 381 | Allowed values |
| 382 | 1 - v1 error format |
| 383 | 2 - v2 error format |
| 384 | |
| 385 | Returns: |
| 386 | An object of the form: |
| 387 | |
| 388 | { # Represents a machine learning solution. |
| 389 | # |
| 390 | # A model can have multiple versions, each of which is a deployed, trained |
| 391 | # model ready to receive prediction requests. The model itself is just a |
| 392 | # container. |
| 393 | "regions": [ # Optional. The list of regions where the model is going to be deployed. |
| 394 | # Currently only one region per model is supported. |
| 395 | # Defaults to 'us-central1' if nothing is set. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 396 | # Note: |
| 397 | # * No matter where a model is deployed, it can always be accessed by |
| 398 | # users from anywhere, both for online and batch prediction. |
| 399 | # * The region for a batch prediction job is set by the region field when |
| 400 | # submitting the batch prediction job and does not take its value from |
| 401 | # this field. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 402 | "A String", |
| 403 | ], |
| 404 | "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to |
| 405 | # handle prediction requests that do not specify a version. |
| 406 | # |
| 407 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 408 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 409 | # |
| 410 | # Each version is a trained model deployed in the cloud, ready to handle |
| 411 | # prediction requests. A model can have multiple versions. You can get |
| 412 | # information about all of the versions of a given model by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 413 | # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 414 | "description": "A String", # Optional. The description specified for the version when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 415 | "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment. |
| 416 | # If not set, Google Cloud ML will choose a version. |
| 417 | "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the |
| 418 | # model. If unset (i.e., by default), the number of nodes used to serve |
| 419 | # the model automatically scales with traffic. However, care should be |
| 420 | # taken to ramp up traffic according to the model's ability to scale. If |
| 421 | # your model needs to handle bursts of traffic beyond it's ability to |
| 422 | # scale, it is recommended you set this field appropriately. |
| 423 | "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up, |
| 424 | # starting from the time the model is deployed, so the cost of operating |
| 425 | # this model will be proportional to nodes * number of hours since |
| 426 | # deployment. |
| 427 | }, |
| 428 | "lastUseTime": "A String", # Output only. The time the version was last used for prediction. |
| 429 | "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to |
| 430 | # create the version. See the |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 431 | # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 432 | # more informaiton. |
| 433 | # |
| 434 | # When passing Version to |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 435 | # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 436 | # the model service uses the specified location as the source of the model. |
| 437 | # Once deployed, the model version is hosted by the prediction service, so |
| 438 | # this location is useful only as a historical record. |
| 439 | "createTime": "A String", # Output only. The time the version was created. |
| 440 | "isDefault": True or False, # Output only. If true, this version will be used to handle prediction |
| 441 | # requests that do not specify a version. |
| 442 | # |
| 443 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 444 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 445 | "name": "A String", # Required.The name specified for the version when it was created. |
| 446 | # |
| 447 | # The version name must be unique within the model it is created in. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 448 | }, |
| 449 | "name": "A String", # Required. The name specified for the model when it was created. |
| 450 | # |
| 451 | # The model name must be unique within the project it is created in. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 452 | "onlinePredictionLogging": True or False, # Optional. If true, enables StackDriver Logging for online prediction. |
| 453 | # Default is false. |
| 454 | "description": "A String", # Optional. The description specified for the model when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 455 | }</pre> |
| 456 | </div> |
| 457 | |
| 458 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 459 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 460 | <pre>Lists the models in a project. |
| 461 | |
| 462 | Each project can contain multiple models, and each model can have multiple |
| 463 | versions. |
| 464 | |
| 465 | Args: |
| 466 | parent: string, Required. The name of the project whose models are to be listed. |
| 467 | |
| 468 | Authorization: requires `Viewer` role on the specified project. (required) |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 469 | pageSize: integer, Optional. The number of models to retrieve per "page" of results. If there |
| 470 | are more remaining results than this number, the response message will |
| 471 | contain a valid value in the `next_page_token` field. |
| 472 | |
| 473 | The default value is 20, and the maximum page size is 100. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 474 | pageToken: string, Optional. A page token to request the next page of results. |
| 475 | |
| 476 | You get the token from the `next_page_token` field of the response from |
| 477 | the previous call. |
| 478 | x__xgafv: string, V1 error format. |
| 479 | Allowed values |
| 480 | 1 - v1 error format |
| 481 | 2 - v2 error format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 482 | |
| 483 | Returns: |
| 484 | An object of the form: |
| 485 | |
| 486 | { # Response message for the ListModels method. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 487 | "nextPageToken": "A String", # Optional. Pass this token as the `page_token` field of the request for a |
| 488 | # subsequent call. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 489 | "models": [ # The list of models. |
| 490 | { # Represents a machine learning solution. |
| 491 | # |
| 492 | # A model can have multiple versions, each of which is a deployed, trained |
| 493 | # model ready to receive prediction requests. The model itself is just a |
| 494 | # container. |
| 495 | "regions": [ # Optional. The list of regions where the model is going to be deployed. |
| 496 | # Currently only one region per model is supported. |
| 497 | # Defaults to 'us-central1' if nothing is set. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 498 | # Note: |
| 499 | # * No matter where a model is deployed, it can always be accessed by |
| 500 | # users from anywhere, both for online and batch prediction. |
| 501 | # * The region for a batch prediction job is set by the region field when |
| 502 | # submitting the batch prediction job and does not take its value from |
| 503 | # this field. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 504 | "A String", |
| 505 | ], |
| 506 | "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to |
| 507 | # handle prediction requests that do not specify a version. |
| 508 | # |
| 509 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 510 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 511 | # |
| 512 | # Each version is a trained model deployed in the cloud, ready to handle |
| 513 | # prediction requests. A model can have multiple versions. You can get |
| 514 | # information about all of the versions of a given model by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 515 | # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 516 | "description": "A String", # Optional. The description specified for the version when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 517 | "runtimeVersion": "A String", # Optional. The Google Cloud ML runtime version to use for this deployment. |
| 518 | # If not set, Google Cloud ML will choose a version. |
| 519 | "manualScaling": { # Options for manually scaling a model. # Optional. Manually select the number of nodes to use for serving the |
| 520 | # model. If unset (i.e., by default), the number of nodes used to serve |
| 521 | # the model automatically scales with traffic. However, care should be |
| 522 | # taken to ramp up traffic according to the model's ability to scale. If |
| 523 | # your model needs to handle bursts of traffic beyond it's ability to |
| 524 | # scale, it is recommended you set this field appropriately. |
| 525 | "nodes": 42, # The number of nodes to allocate for this model. These nodes are always up, |
| 526 | # starting from the time the model is deployed, so the cost of operating |
| 527 | # this model will be proportional to nodes * number of hours since |
| 528 | # deployment. |
| 529 | }, |
| 530 | "lastUseTime": "A String", # Output only. The time the version was last used for prediction. |
| 531 | "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to |
| 532 | # create the version. See the |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 533 | # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview) for |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 534 | # more informaiton. |
| 535 | # |
| 536 | # When passing Version to |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 537 | # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 538 | # the model service uses the specified location as the source of the model. |
| 539 | # Once deployed, the model version is hosted by the prediction service, so |
| 540 | # this location is useful only as a historical record. |
| 541 | "createTime": "A String", # Output only. The time the version was created. |
| 542 | "isDefault": True or False, # Output only. If true, this version will be used to handle prediction |
| 543 | # requests that do not specify a version. |
| 544 | # |
| 545 | # You can change the default version by calling |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 546 | # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault). |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 547 | "name": "A String", # Required.The name specified for the version when it was created. |
| 548 | # |
| 549 | # The version name must be unique within the model it is created in. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 550 | }, |
| 551 | "name": "A String", # Required. The name specified for the model when it was created. |
| 552 | # |
| 553 | # The model name must be unique within the project it is created in. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 554 | "onlinePredictionLogging": True or False, # Optional. If true, enables StackDriver Logging for online prediction. |
| 555 | # Default is false. |
| 556 | "description": "A String", # Optional. The description specified for the model when it was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 557 | }, |
| 558 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 559 | }</pre> |
| 560 | </div> |
| 561 | |
| 562 | <div class="method"> |
| 563 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 564 | <pre>Retrieves the next page of results. |
| 565 | |
| 566 | Args: |
| 567 | previous_request: The request for the previous page. (required) |
| 568 | previous_response: The response from the request for the previous page. (required) |
| 569 | |
| 570 | Returns: |
| 571 | A request object that you can call 'execute()' on to request the next |
| 572 | page. Returns None if there are no more items in the collection. |
| 573 | </pre> |
| 574 | </div> |
| 575 | |
| 576 | </body></html> |