Class: Google::Apis::MlV1::GoogleCloudMlV1Model
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1Model
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ml_v1/classes.rb,
lib/google/apis/ml_v1/representations.rb,
lib/google/apis/ml_v1/representations.rb
Overview
Represents a machine learning solution. A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container.
Instance Attribute Summary collapse
-
#default_version ⇒ Google::Apis::MlV1::GoogleCloudMlV1Version
Represents a version of the model.
-
#description ⇒ String
Optional.
-
#etag ⇒ String
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a model from overwriting each other. -
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Required.
-
#online_prediction_console_logging ⇒ Boolean
(also: #online_prediction_console_logging?)
Optional.
-
#online_prediction_logging ⇒ Boolean
(also: #online_prediction_logging?)
Optional.
-
#regions ⇒ Array<String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1Model
constructor
A new instance of GoogleCloudMlV1Model.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1Model
Returns a new instance of GoogleCloudMlV1Model.
1799 1800 1801 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1799 def initialize(**args) update!(**args) end |
Instance Attribute Details
#default_version ⇒ Google::Apis::MlV1::GoogleCloudMlV1Version
Represents a version of the model. Each version is a trained model deployed in
the cloud, ready to handle prediction requests. A model can have multiple
versions. You can get information about all of the versions of a given model
by calling projects.models.versions.list.
Corresponds to the JSON property defaultVersion
1733 1734 1735 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1733 def default_version @default_version end |
#description ⇒ String
Optional. The description specified for the model when it was created.
Corresponds to the JSON property description
1738 1739 1740 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1738 def description @description end |
#etag ⇒ String
etag is used for optimistic concurrency control as a way to help prevent
simultaneous updates of a model from overwriting each other. It is strongly
suggested that systems make use of the etag in the read-modify-write cycle
to perform model updates in order to avoid race conditions: An etag is
returned in the response to GetModel, and systems are expected to put that
etag in the request to UpdateModel to ensure that their change will be
applied to the model as intended.
Corresponds to the JSON property etag
NOTE: Values are automatically base64 encoded/decoded in the client library.
1750 1751 1752 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1750 def etag @etag end |
#labels ⇒ Hash<String,String>
Optional. One or more labels that you can add, to organize your models. Each
label is a key-value pair, where both the key and the value are arbitrary
strings that you supply. For more information, see the documentation on using
labels.
Corresponds to the JSON property labels
1758 1759 1760 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1758 def labels @labels end |
#name ⇒ String
Required. The name specified for the model when it was created. The model name
must be unique within the project it is created in.
Corresponds to the JSON property name
1764 1765 1766 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1764 def name @name end |
#online_prediction_console_logging ⇒ Boolean Also known as: online_prediction_console_logging?
Optional. If true, online prediction nodes send stderr and stdout streams
to Cloud Logging. These can be more verbose than the standard access logs (see
onlinePredictionLogging) and can incur higher cost. However, they are
helpful for debugging. Note that logs may incur a cost,
especially if your project receives prediction requests at a high QPS.
Estimate your costs before enabling this option. Default is false.
Corresponds to the JSON property onlinePredictionConsoleLogging
1774 1775 1776 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1774 def online_prediction_console_logging @online_prediction_console_logging end |
#online_prediction_logging ⇒ Boolean Also known as: online_prediction_logging?
Optional. If true, online prediction access logs are sent to Cloud Logging.
These logs are like standard server access logs, containing information like
timestamp and latency for each request. Note that logs may incur a cost, especially if your project receives prediction requests
at a high queries per second rate (QPS). Estimate your costs before enabling
this option. Default is false.
Corresponds to the JSON property onlinePredictionLogging
1785 1786 1787 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1785 def online_prediction_logging @online_prediction_logging end |
#regions ⇒ Array<String>
Optional. The list of regions where the model is going to be deployed. Only
one region per model is supported. Defaults to 'us-central1' if nothing is set.
See the available regions for AI Platform services. Note: * No matter where a
model is deployed, it can always be accessed by users from anywhere, both for
online and batch prediction. * The region for a batch prediction job is set by
the region field when submitting the batch prediction job and does not take
its value from this field.
Corresponds to the JSON property regions
1797 1798 1799 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1797 def regions @regions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1804 def update!(**args) @default_version = args[:default_version] if args.key?(:default_version) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @online_prediction_console_logging = args[:online_prediction_console_logging] if args.key?(:online_prediction_console_logging) @online_prediction_logging = args[:online_prediction_logging] if args.key?(:online_prediction_logging) @regions = args[:regions] if args.key?(:regions) end |