google-cloud-automl 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7374774e7d04ac9f95b2f313daa23986c9d81708a66a48e40315e17b81d7cc93
4
- data.tar.gz: 12baba889dfa5a99a8a9c87be3d5d1b8a4f021405d08e151ff6ab5b6ef33ddd4
3
+ metadata.gz: 794a1ea74b32d996fa514a75565bbc64ed4e26a6196aff1abac04bceb6d97467
4
+ data.tar.gz: 93036f5a18f1e84d81004a8e0d76d3d060f6d22d140de7e26da3ccb446b23273
5
5
  SHA512:
6
- metadata.gz: 84052af35bb2fc61b0a9dc0fbb65dc60bae5716ea393d1a262d2ff38f8e62c333f25328d3fc260caeb4444b475436f3447131b9664c84a03251157f34ffbb218
7
- data.tar.gz: eca6889853699423249a5143856c7eda5d2b9a63be010de498da77f2916ddbdffa07da8f873faf705fec16e16a2dee1d693d001d00bbe1adbd564e408ebaa02e
6
+ metadata.gz: 2b994bcba20c2734713614e5a9310af305e92efbe41660754dd910fe739ab12a8bd6a53225f18133d04a46b2e152039b7c270200bade6d70c9f8b8104033c152
7
+ data.tar.gz: ffd6fa56f1f046ec5b4818c61927ac044c26e9c46977fbfbbd7fb0fa6655440ac0501f95e674030d6fccb05743fd51938e6ffac8639ec4c70f2c13305e1b952f
data/AUTHENTICATION.md CHANGED
@@ -26,7 +26,7 @@ export AUTOML_CREDENTIALS=/path/to/json`
26
26
  ```ruby
27
27
  require "google/cloud/automl"
28
28
 
29
- client = Google::Cloud::AutoML.new
29
+ client = Google::Cloud::AutoML::AutoML.new
30
30
  ```
31
31
 
32
32
  ## Project and Credential Lookup
@@ -41,7 +41,7 @@ code.
41
41
  1. Specify project ID in method arguments
42
42
  2. Specify project ID in configuration
43
43
  3. Discover project ID in environment variables
44
- 4. Discover GCE project ID
44
+ 4. Discover GCP project ID
45
45
  5. Discover project ID in credentials JSON
46
46
 
47
47
  **Credentials** are discovered in the following order:
@@ -51,36 +51,14 @@ code.
51
51
  3. Discover credentials path in environment variables
52
52
  4. Discover credentials JSON in environment variables
53
53
  5. Discover credentials file in the Cloud SDK's path
54
- 6. Discover GCE credentials
54
+ 6. Discover GCP credentials
55
55
 
56
56
  ### Google Cloud Platform environments
57
57
 
58
- While running on Google Cloud Platform environments such as Google Compute
59
- Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
- The **Project ID** and **Credentials** and are discovered automatically. Code
61
- should be written as if already authenticated. Just be sure when you [set up the
62
- GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
- access. For example:
64
-
65
- * **All APIs**
66
- * `https://www.googleapis.com/auth/cloud-platform`
67
- * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
- * **BigQuery**
69
- * `https://www.googleapis.com/auth/bigquery`
70
- * `https://www.googleapis.com/auth/bigquery.insertdata`
71
- * **Compute Engine**
72
- * `https://www.googleapis.com/auth/compute`
73
- * **Datastore**
74
- * `https://www.googleapis.com/auth/datastore`
75
- * `https://www.googleapis.com/auth/userinfo.email`
76
- * **DNS**
77
- * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
- * **Pub/Sub**
79
- * `https://www.googleapis.com/auth/pubsub`
80
- * **Storage**
81
- * `https://www.googleapis.com/auth/devstorage.full_control`
82
- * `https://www.googleapis.com/auth/devstorage.read_only`
83
- * `https://www.googleapis.com/auth/devstorage.read_write`
58
+ When running on Google Cloud Platform (GCP), including Google Compute Engine (GCE),
59
+ Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud Functions
60
+ (GCF) and Cloud Run, the **Project ID** and **Credentials** and are discovered
61
+ automatically. Code should be written as if already authenticated.
84
62
 
85
63
  ### Environment Variables
86
64
 
@@ -112,7 +90,7 @@ require "google/cloud/automl"
112
90
  ENV["AUTOML_PROJECT"] = "my-project-id"
113
91
  ENV["AUTOML_CREDENTIALS"] = "path/to/keyfile.json"
114
92
 
115
- client = Google::Cloud::AutoML.new
93
+ client = Google::Cloud::AutoML::AutoML.new
116
94
  ```
117
95
 
118
96
  ### Configuration
@@ -127,7 +105,7 @@ Google::Cloud::AutoML.configure do |config|
127
105
  config.credentials = "path/to/keyfile.json"
128
106
  end
129
107
 
130
- client = Google::Cloud::AutoML.new
108
+ client = Google::Cloud::AutoML::AutoML.new
131
109
  ```
132
110
 
133
111
  ### Cloud SDK
data/README.md CHANGED
@@ -59,11 +59,11 @@ end
59
59
 
60
60
  ## Supported Ruby Versions
61
61
 
62
- This library is supported on Ruby 2.3+.
62
+ This library is supported on Ruby 2.4+.
63
63
 
64
64
  Google provides official support for Ruby versions that are actively supported
65
65
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
66
- in security maintenance, and not end of life. Currently, this means Ruby 2.3
66
+ in security maintenance, and not end of life. Currently, this means Ruby 2.4
67
67
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
68
68
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
69
69
  about the Ruby support schedule.
@@ -4,8 +4,8 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
- require 'google/cloud/automl/v1beta1/temporal_pb'
8
7
  require 'google/api/annotations_pb'
8
+ require 'google/cloud/automl/v1beta1/temporal_pb'
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_message "google.cloud.automl.v1beta1.ClassificationAnnotation" do
11
11
  optional :score, :float, 1
@@ -140,7 +140,10 @@ module Google
140
140
  # for each example.
141
141
  # @!attribute [rw] f1_score_at1
142
142
  # @return [Float]
143
- # Output only. The harmonic mean of {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}.
143
+ # Output only. The harmonic mean of
144
+ # {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1}
145
+ # and
146
+ # {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}.
144
147
  # @!attribute [rw] true_positive_count
145
148
  # @return [Integer]
146
149
  # Output only. The number of model created labels that match a ground truth
@@ -180,9 +183,9 @@ module Google
180
183
  # @return [Array<Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>]
181
184
  # Output only. Rows in the confusion matrix. The number of rows is equal to
182
185
  # the size of `annotation_spec_id`.
183
- # `row[i].value[j]` is the number of examples that have ground truth of the
184
- # `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
185
- # the model being evaluated.
186
+ # `row[i].example_count[j]` is the number of examples that have ground
187
+ # truth of the `annotation_spec_id[i]` and are predicted as
188
+ # `annotation_spec_id[j]` by the model being evaluated.
186
189
  class ConfusionMatrix
187
190
  # Output only. A row in the confusion matrix.
188
191
  # @!attribute [rw] example_count
@@ -190,7 +193,9 @@ module Google
190
193
  # Output only. Value of the specific cell in the confusion matrix.
191
194
  # The number of values each row has (i.e. the length of the row) is equal
192
195
  # to the length of the `annotation_spec_id` field or, if that one is not
193
- # populated, length of the {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field.
196
+ # populated, length of the
197
+ # {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name}
198
+ # field.
194
199
  class Row; end
195
200
  end
196
201
  end
@@ -86,6 +86,15 @@ module Google
86
86
  # and used on a mobile device with Core ML afterwards. Expected
87
87
  # to have a higher latency, but should also have a higher
88
88
  # prediction quality than other models.
89
+ # @!attribute [rw] node_qps
90
+ # @return [Float]
91
+ # Output only. An approximate number of online prediction QPS that can
92
+ # be supported by this model per each node on which it is deployed.
93
+ # @!attribute [rw] node_count
94
+ # @return [Integer]
95
+ # Output only. The number of nodes this model is deployed on. A node is an
96
+ # abstraction of a machine resource, which can handle online prediction QPS
97
+ # as given in the node_qps field.
89
98
  class ImageClassificationModelMetadata; end
90
99
 
91
100
  # Model metadata specific to image object detection.
@@ -121,7 +130,7 @@ module Google
121
130
  # full budget and the stop_reason will be `MODEL_CONVERGED`.
122
131
  # Note, node_hour = actual_hour * number_of_nodes_invovled.
123
132
  # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
124
- # the train budget must be between 20,000 and 2,000,000 milli node hours,
133
+ # the train budget must be between 20,000 and 900,000 milli node hours,
125
134
  # inclusive. The default value is 216, 000 which represents one day in
126
135
  # wall time.
127
136
  # For model type `mobile-low-latency-1`, `mobile-versatile-1`,
@@ -142,7 +151,8 @@ module Google
142
151
  # Input only. The number of nodes to deploy the model on. A node is an
143
152
  # abstraction of a machine resource, which can handle online prediction QPS
144
153
  # as given in the model's
145
- # {Google::Cloud::AutoML::V1p1beta::ImageClassificationModelMetadata#node_qps node_qps}.
154
+ #
155
+ # {Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}.
146
156
  # Must be between 1 and 100, inclusive on both ends.
147
157
  class ImageClassificationModelDeploymentMetadata; end
148
158
 
@@ -964,7 +964,7 @@ module Google
964
964
  # @return [Google::Cloud::AutoML::V1beta1::GcsDestination]
965
965
  # The Google Cloud Storage location where the model is to be written to.
966
966
  # This location may only be set for the following model formats:
967
- # "tflite", "edgetpu_tflite", "core_ml", "docker".
967
+ # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
968
968
  #
969
969
  # Under the directory given as the destination a new one with name
970
970
  # "model-export-<model-display-name>-<timestamp-of-export-call>",
@@ -987,7 +987,8 @@ module Google
987
987
  #
988
988
  # * For Image Classification mobile-low-latency-1, mobile-versatile-1,
989
989
  # mobile-high-accuracy-1:
990
- # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "docker".
990
+ # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
991
+ # "docker".
991
992
  #
992
993
  # * For Image Classification mobile-core-ml-low-latency-1,
993
994
  # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
@@ -998,6 +999,8 @@ module Google
998
999
  # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/)
999
1000
  # devices.
1000
1001
  # * tf_saved_model - A tensorflow model in SavedModel format.
1002
+ # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can
1003
+ # be used in the browser and in Node.js using JavaScript.
1001
1004
  # * docker - Used for Docker containers. Use the params field to customize
1002
1005
  # the container. The container is verified to work correctly on
1003
1006
  # ubuntu 16.04 operating system. See more at
@@ -86,6 +86,14 @@ module Google
86
86
  class TablesDatasetMetadata; end
87
87
 
88
88
  # Model metadata specific to AutoML Tables.
89
+ # @!attribute [rw] optimization_objective_recall_value
90
+ # @return [Float]
91
+ # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL".
92
+ # Must be between 0 and 1, inclusive.
93
+ # @!attribute [rw] optimization_objective_precision_value
94
+ # @return [Float]
95
+ # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION".
96
+ # Must be between 0 and 1, inclusive.
89
97
  # @!attribute [rw] target_column_spec
90
98
  # @return [Google::Cloud::AutoML::V1beta1::ColumnSpec]
91
99
  # Column spec of the dataset's primary table's column the model is
@@ -24,6 +24,9 @@ module Google
24
24
  class TextClassificationDatasetMetadata; end
25
25
 
26
26
  # Model metadata that is specific to text classification.
27
+ # @!attribute [rw] classification_type
28
+ # @return [Google::Cloud::AutoML::V1beta1::ClassificationType]
29
+ # Output only. Classification type of the dataset used to train this model.
27
30
  class TextClassificationModelMetadata; end
28
31
 
29
32
  # Dataset metadata that is specific to text extraction
@@ -35,12 +38,11 @@ module Google
35
38
  # Dataset metadata for text sentiment.
36
39
  # @!attribute [rw] sentiment_max
37
40
  # @return [Integer]
38
- # Required. A sentiment is expressed as an integer ordinal, where higher value
39
- # means a more positive sentiment. The range of sentiments that will be used
40
- # is between 0 and sentiment_max (inclusive on both ends), and all the values
41
- # in the range must be represented in the dataset before a model can be
42
- # created.
43
- # sentiment_max value must be between 1 and 10 (inclusive).
41
+ # Required. A sentiment is expressed as an integer ordinal, where higher
42
+ # value means a more positive sentiment. The range of sentiments that will be
43
+ # used is between 0 and sentiment_max (inclusive on both ends), and all the
44
+ # values in the range must be represented in the dataset before a model can
45
+ # be created. sentiment_max value must be between 1 and 10 (inclusive).
44
46
  class TextSentimentDatasetMetadata; end
45
47
 
46
48
  # Model metadata that is specific to text sentiment.
@@ -20,6 +20,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  optional :train_cost, :int64, 3
21
21
  optional :stop_reason, :string, 5
22
22
  optional :model_type, :string, 7
23
+ optional :node_qps, :double, 13
24
+ optional :node_count, :int64, 14
23
25
  end
24
26
  add_message "google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata" do
25
27
  optional :model_type, :string, 1
@@ -4,13 +4,13 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/annotations_pb'
7
8
  require 'google/cloud/automl/v1beta1/io_pb'
8
9
  require 'google/cloud/automl/v1beta1/model_pb'
9
10
  require 'google/cloud/automl/v1beta1/model_evaluation_pb'
10
11
  require 'google/protobuf/empty_pb'
11
12
  require 'google/protobuf/timestamp_pb'
12
13
  require 'google/rpc/status_pb'
13
- require 'google/api/annotations_pb'
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_message "google.cloud.automl.v1beta1.OperationMetadata" do
16
16
  optional :progress_percent, :int32, 13
@@ -4,6 +4,7 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/annotations_pb'
7
8
  require 'google/cloud/automl/v1beta1/classification_pb'
8
9
  require 'google/cloud/automl/v1beta1/column_spec_pb'
9
10
  require 'google/cloud/automl/v1beta1/data_items_pb'
@@ -12,7 +13,6 @@ require 'google/cloud/automl/v1beta1/ranges_pb'
12
13
  require 'google/cloud/automl/v1beta1/temporal_pb'
13
14
  require 'google/protobuf/struct_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
- require 'google/api/annotations_pb'
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_message "google.cloud.automl.v1beta1.TablesDatasetMetadata" do
18
18
  optional :primary_table_spec_id, :string, 1
@@ -30,6 +30,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
30
  optional :train_budget_milli_node_hours, :int64, 6
31
31
  optional :train_cost_milli_node_hours, :int64, 7
32
32
  optional :disable_early_stopping, :bool, 12
33
+ oneof :additional_optimization_objective_config do
34
+ optional :optimization_objective_recall_value, :float, 17
35
+ optional :optimization_objective_precision_value, :float, 18
36
+ end
33
37
  end
34
38
  add_message "google.cloud.automl.v1beta1.TablesAnnotation" do
35
39
  optional :score, :float, 1
@@ -4,13 +4,14 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
- require 'google/cloud/automl/v1beta1/classification_pb'
8
7
  require 'google/api/annotations_pb'
8
+ require 'google/cloud/automl/v1beta1/classification_pb'
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_message "google.cloud.automl.v1beta1.TextClassificationDatasetMetadata" do
11
11
  optional :classification_type, :enum, 1, "google.cloud.automl.v1beta1.ClassificationType"
12
12
  end
13
13
  add_message "google.cloud.automl.v1beta1.TextClassificationModelMetadata" do
14
+ optional :classification_type, :enum, 3, "google.cloud.automl.v1beta1.ClassificationType"
14
15
  end
15
16
  add_message "google.cloud.automl.v1beta1.TextExtractionDatasetMetadata" do
16
17
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module AutoML
19
- VERSION = "0.3.0".freeze
19
+ VERSION = "0.4.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-automl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2019-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -16,14 +16,54 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '1.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '1.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: googleapis-common-protos
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.3.9
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.3.9
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: googleapis-common-protos-types
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.4
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.0'
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 1.0.4
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.0'
27
67
  - !ruby/object:Gem::Dependency
28
68
  name: minitest
29
69
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +93,19 @@ dependencies:
53
93
  - !ruby/object:Gem::Version
54
94
  version: '3.0'
55
95
  - !ruby/object:Gem::Dependency
56
- name: rubocop
96
+ name: google-style
57
97
  requirement: !ruby/object:Gem::Requirement
58
98
  requirements:
59
99
  - - "~>"
60
100
  - !ruby/object:Gem::Version
61
- version: 0.64.0
101
+ version: 1.24.0
62
102
  type: :development
63
103
  prerelease: false
64
104
  version_requirements: !ruby/object:Gem::Requirement
65
105
  requirements:
66
106
  - - "~>"
67
107
  - !ruby/object:Gem::Version
68
- version: 0.64.0
108
+ version: 1.24.0
69
109
  - !ruby/object:Gem::Dependency
70
110
  name: simplecov
71
111
  requirement: !ruby/object:Gem::Requirement
@@ -189,14 +229,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
229
  requirements:
190
230
  - - ">="
191
231
  - !ruby/object:Gem::Version
192
- version: 2.0.0
232
+ version: '2.4'
193
233
  required_rubygems_version: !ruby/object:Gem::Requirement
194
234
  requirements:
195
235
  - - ">="
196
236
  - !ruby/object:Gem::Version
197
237
  version: '0'
198
238
  requirements: []
199
- rubygems_version: 3.0.4
239
+ rubygems_version: 3.0.6
200
240
  signing_key:
201
241
  specification_version: 4
202
242
  summary: API Client library for Cloud AutoML API