google-cloud-automl 0.4.0 → 0.5.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: 794a1ea74b32d996fa514a75565bbc64ed4e26a6196aff1abac04bceb6d97467
4
- data.tar.gz: 93036f5a18f1e84d81004a8e0d76d3d060f6d22d140de7e26da3ccb446b23273
3
+ metadata.gz: 1c418a01da2ccbf50803e10e39e0aceac198f0c3e4e9887786500ced2d8e634e
4
+ data.tar.gz: 5d342d1fe83fd640f526300422902003c756bec433da599c687f136d2e0ec2f4
5
5
  SHA512:
6
- metadata.gz: 2b994bcba20c2734713614e5a9310af305e92efbe41660754dd910fe739ab12a8bd6a53225f18133d04a46b2e152039b7c270200bade6d70c9f8b8104033c152
7
- data.tar.gz: ffd6fa56f1f046ec5b4818c61927ac044c26e9c46977fbfbbd7fb0fa6655440ac0501f95e674030d6fccb05743fd51938e6ffac8639ec4c70f2c13305e1b952f
6
+ metadata.gz: 59a5d7e9da6208efe0804a4f9cbbe23857de26219ea8d0396169c4020bd9787be067cb8cd937ba76ec2c1647e2c6adb4b56e7f3f7045d2bba07654e4c78dd1a6
7
+ data.tar.gz: 0246f5aab738978984e4fd23d0db6a74a323efb5d4d7058818bb0d6e405b8c7be0b5e4cab81fa4bfb3bc27bd60ba5f8591f4ab562d79e657911ee05f4a0cb1c4
@@ -30,6 +30,7 @@ require "google/longrunning/operations_client"
30
30
  require "google/cloud/automl/v1beta1/service_pb"
31
31
  require "google/cloud/automl/v1beta1/credentials"
32
32
  require "google/cloud/automl/version"
33
+ require "google/cloud/automl/v1beta1/automl_client_helpers"
33
34
 
34
35
  module Google
35
36
  module Cloud
@@ -0,0 +1,109 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # EDITING INSTRUCTIONS
16
+ # This file was generated from the file
17
+ # https://github.com/googleapis/googleapis/blob/master/google/cloud/automl/v1beta1/service.proto,
18
+ # and updates to that file get reflected here through a refresh process.
19
+ # For the short term, the refresh process will only be runnable by Google
20
+ # engineers.
21
+
22
+
23
+ module Google
24
+ module Cloud
25
+ module AutoML
26
+ module V1beta1
27
+ class AutoMLClient
28
+ ##
29
+ # Gets the latest state of a long-running operation. Clients can use this
30
+ # method to poll the operation result at intervals as recommended by the API
31
+ # service.
32
+ #
33
+ # @param name [String]
34
+ # The name of the operation resource.
35
+ # @param options [Google::Gax::CallOptions]
36
+ # Overrides the default settings for this call, e.g, timeout,
37
+ # retries, etc.
38
+ # @return [Google::Gax::Operation]
39
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
40
+ # @example
41
+ # require "google/cloud/automl"
42
+ #
43
+ # automl_client = Google::Cloud::AutoML::AutoML.new(version: :v1beta1)
44
+ # operation_name = "projects/[PROJECT]/locations/[LOCATION]/operations/[OPERATION]"
45
+ # operation = automl_client.get_operation(operation_name)
46
+ #
47
+ def get_operation name, options: nil
48
+ proto_op = @operations_client.get_operation name, options: options
49
+
50
+ Google::Gax::Operation.new(
51
+ proto_op,
52
+ @operations_client,
53
+ nil,
54
+ nil,
55
+ call_options: options
56
+ )
57
+ end
58
+
59
+ ##
60
+ # Lists operations that match the specified filter in the request.
61
+ #
62
+ # @param name [String]
63
+ # The name of the operation collection.
64
+ # @param filter [String]
65
+ # The standard list filter.
66
+ # @param page_size [Integer]
67
+ # The maximum number of resources contained in the underlying API
68
+ # response. If page streaming is performed per-resource, this
69
+ # parameter does not affect the return value. If page streaming is
70
+ # performed per-page, this determines the maximum number of
71
+ # resources in a page.
72
+ # @param options [Google::Gax::CallOptions]
73
+ # Overrides the default settings for this call, e.g, timeout,
74
+ # retries, etc.
75
+ # @return [Google::Gax::PagedEnumerable<Google::Gax::Operation>]
76
+ # An enumerable of Google::Gax::Operation instances.
77
+ # See Google::Gax::PagedEnumerable documentation for other
78
+ # operations such as per-page iteration or access to the response
79
+ # object.
80
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
81
+ # @example
82
+ # require "google/cloud/automl"
83
+ #
84
+ # automl_client = Google::Cloud::AutoML::AutoML.new(version: :v1beta1)
85
+ # formatted_name = automl_client.class.location_path("[PROJECT]", "[LOCATION]")
86
+ # operations = automl_client.list_operations(formatted_name, "")
87
+ #
88
+ def list_operations name, filter, page_size: nil, options: nil
89
+ paged_operations = @operations_client.list_operations name, filter, page_size: page_size, options: options
90
+ # Monkey-patch PagedEnumerable#each to yield Google::Gax::Operation instead of
91
+ # Google::Longrunning::Operation.
92
+ def paged_operations.each
93
+ return enum_for :each unless block_given?
94
+ super do |proto_op|
95
+ yield Google::Gax::Operation.new(
96
+ proto_op,
97
+ @operations_client,
98
+ nil,
99
+ nil
100
+ )
101
+ end
102
+ end
103
+ paged_operations
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -255,9 +255,10 @@ module Google
255
255
  # {Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance}
256
256
  # param is set):
257
257
  # Measurement of how impactful for the prediction returned for the given row
258
- # the value in this column was. A value between 0 and 1, higher means larger
259
- # impact. These values are normalized - for all input feature columns of a
260
- # single predicted row they add to 1.
258
+ # the value in this column was. Specifically, the feature importance
259
+ # specifies the marginal contribution that the feature made to the prediction
260
+ # score compared to the baseline score. These values are computed using the
261
+ # Sampled Shapley method.
261
262
  class TablesModelColumnInfo; end
262
263
  end
263
264
  end
@@ -6,9 +6,6 @@ require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
8
  require 'google/cloud/automl/v1beta1/io_pb'
9
- require 'google/cloud/automl/v1beta1/model_pb'
10
- require 'google/cloud/automl/v1beta1/model_evaluation_pb'
11
- require 'google/protobuf/empty_pb'
12
9
  require 'google/protobuf/timestamp_pb'
13
10
  require 'google/rpc/status_pb'
14
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module AutoML
19
- VERSION = "0.4.0".freeze
19
+ VERSION = "0.5.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.4.0
4
+ version: 0.5.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-11-05 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -151,6 +151,7 @@ files:
151
151
  - lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb
152
152
  - lib/google/cloud/automl/v1beta1/automl_client.rb
153
153
  - lib/google/cloud/automl/v1beta1/automl_client_config.json
154
+ - lib/google/cloud/automl/v1beta1/automl_client_helpers.rb
154
155
  - lib/google/cloud/automl/v1beta1/classification_pb.rb
155
156
  - lib/google/cloud/automl/v1beta1/column_spec_pb.rb
156
157
  - lib/google/cloud/automl/v1beta1/credentials.rb