google-cloud-automl 1.4.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -1
- data/lib/google/cloud/automl/version.rb +1 -1
- data/lib/google/cloud/automl.rb +72 -0
- metadata +4 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d550fc6bd21ded468ddee19ead616df475c49daec46ac6dade21cddfb2a887a5
|
4
|
+
data.tar.gz: 68f1dd7e7208b29e5c5402555576f0cfedef14506a2662701a48e1eb72e12d18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cce1b1939ac8e575ecdf44dd47573d5f9b6a4608a5f7ff7aca5b203249839c26c344ffa2dd2b473220f35fbc649c750bc8bad851aacc1b2f78d22deea3f606a
|
7
|
+
data.tar.gz: e8f06799e3a0745492f91c796c05acf957546f5e8ab23340e498158231372fa185a1918b24a82be324f7401bb284e512721076ed602fe6ee0e84aa4ff1be6d1f
|
data/README.md
CHANGED
@@ -43,9 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
|
|
43
43
|
versions of this library will likely require updates to use this version.
|
44
44
|
See the {file:MIGRATING.md MIGRATING.md} document for more information.
|
45
45
|
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
Debug logging also requires that the versioned clients for this service be
|
72
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
73
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
74
|
+
[google-cloud-automl-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest),
|
75
|
+
[google-cloud-automl-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest).
|
76
|
+
|
46
77
|
## Supported Ruby Versions
|
47
78
|
|
48
|
-
This library is supported on Ruby
|
79
|
+
This library is supported on Ruby 3.0+.
|
49
80
|
|
50
81
|
Google provides official support for Ruby versions that are actively supported
|
51
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
data/lib/google/cloud/automl.rb
CHANGED
@@ -58,6 +58,11 @@ module Google
|
|
58
58
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
59
|
# the `transport` parameter.
|
60
60
|
#
|
61
|
+
# Raises an exception if the currently installed versioned client gem for the
|
62
|
+
# given API version does not support the given transport of the PredictionService service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::AutoML.prediction_service_available?}.
|
65
|
+
#
|
61
66
|
# ## About PredictionService
|
62
67
|
#
|
63
68
|
# AutoML Prediction API.
|
@@ -82,6 +87,37 @@ module Google
|
|
82
87
|
service_module.const_get(:Client).new(&block)
|
83
88
|
end
|
84
89
|
|
90
|
+
##
|
91
|
+
# Determines whether the PredictionService service is supported by the current client.
|
92
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AutoML.prediction_service}.
|
93
|
+
# If false, that method will raise an exception. This could happen if the given
|
94
|
+
# API version does not exist or does not support the PredictionService service,
|
95
|
+
# or if the versioned client gem needs an update to support the PredictionService service.
|
96
|
+
#
|
97
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
98
|
+
# Defaults to `:v1`.
|
99
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
100
|
+
# @return [boolean] Whether the service is available.
|
101
|
+
#
|
102
|
+
def self.prediction_service_available? version: :v1, transport: :grpc
|
103
|
+
require "google/cloud/automl/#{version.to_s.downcase}"
|
104
|
+
package_name = Google::Cloud::AutoML
|
105
|
+
.constants
|
106
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
107
|
+
.first
|
108
|
+
return false unless package_name
|
109
|
+
service_module = Google::Cloud::AutoML.const_get package_name
|
110
|
+
return false unless service_module.const_defined? :PredictionService
|
111
|
+
service_module = service_module.const_get :PredictionService
|
112
|
+
if transport == :rest
|
113
|
+
return false unless service_module.const_defined? :Rest
|
114
|
+
service_module = service_module.const_get :Rest
|
115
|
+
end
|
116
|
+
service_module.const_defined? :Client
|
117
|
+
rescue ::LoadError
|
118
|
+
false
|
119
|
+
end
|
120
|
+
|
85
121
|
##
|
86
122
|
# Create a new client object for AutoML.
|
87
123
|
#
|
@@ -95,6 +131,11 @@ module Google
|
|
95
131
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
96
132
|
# the `transport` parameter.
|
97
133
|
#
|
134
|
+
# Raises an exception if the currently installed versioned client gem for the
|
135
|
+
# given API version does not support the given transport of the AutoML service.
|
136
|
+
# You can determine whether the method will succeed by calling
|
137
|
+
# {Google::Cloud::AutoML.automl_available?}.
|
138
|
+
#
|
98
139
|
# ## About AutoML
|
99
140
|
#
|
100
141
|
# AutoML Server API.
|
@@ -129,6 +170,37 @@ module Google
|
|
129
170
|
service_module.const_get(:Client).new(&block)
|
130
171
|
end
|
131
172
|
|
173
|
+
##
|
174
|
+
# Determines whether the AutoML service is supported by the current client.
|
175
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AutoML.automl}.
|
176
|
+
# If false, that method will raise an exception. This could happen if the given
|
177
|
+
# API version does not exist or does not support the AutoML service,
|
178
|
+
# or if the versioned client gem needs an update to support the AutoML service.
|
179
|
+
#
|
180
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
181
|
+
# Defaults to `:v1`.
|
182
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
183
|
+
# @return [boolean] Whether the service is available.
|
184
|
+
#
|
185
|
+
def self.automl_available? version: :v1, transport: :grpc
|
186
|
+
require "google/cloud/automl/#{version.to_s.downcase}"
|
187
|
+
package_name = Google::Cloud::AutoML
|
188
|
+
.constants
|
189
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
190
|
+
.first
|
191
|
+
return false unless package_name
|
192
|
+
service_module = Google::Cloud::AutoML.const_get package_name
|
193
|
+
return false unless service_module.const_defined? :AutoML
|
194
|
+
service_module = service_module.const_get :AutoML
|
195
|
+
if transport == :rest
|
196
|
+
return false unless service_module.const_defined? :Rest
|
197
|
+
service_module = service_module.const_get :Rest
|
198
|
+
end
|
199
|
+
service_module.const_defined? :Client
|
200
|
+
rescue ::LoadError
|
201
|
+
false
|
202
|
+
end
|
203
|
+
|
132
204
|
##
|
133
205
|
# Configure the google-cloud-automl library.
|
134
206
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-automl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-automl-v1
|
@@ -64,118 +63,6 @@ dependencies:
|
|
64
63
|
- - "~>"
|
65
64
|
- !ruby/object:Gem::Version
|
66
65
|
version: '1.6'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: google-style
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: 1.26.1
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 1.26.1
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: minitest
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '5.16'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '5.16'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: minitest-focus
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '1.1'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '1.1'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: minitest-rg
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '5.2'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '5.2'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: rake
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '13.0'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '13.0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: redcarpet
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '3.0'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '3.0'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: simplecov
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0.9'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '0.9'
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: yard
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - "~>"
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '0.9'
|
172
|
-
type: :development
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - "~>"
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: '0.9'
|
179
66
|
description: AutoML makes the power of machine learning available to you even if you
|
180
67
|
have limited knowledge of machine learning. You can use AutoML to build on Google's
|
181
68
|
machine learning capabilities to create your own custom machine learning models
|
@@ -199,7 +86,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
199
86
|
licenses:
|
200
87
|
- Apache-2.0
|
201
88
|
metadata: {}
|
202
|
-
post_install_message:
|
203
89
|
rdoc_options: []
|
204
90
|
require_paths:
|
205
91
|
- lib
|
@@ -207,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
93
|
requirements:
|
208
94
|
- - ">="
|
209
95
|
- !ruby/object:Gem::Version
|
210
|
-
version: '
|
96
|
+
version: '3.0'
|
211
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
98
|
requirements:
|
213
99
|
- - ">="
|
214
100
|
- !ruby/object:Gem::Version
|
215
101
|
version: '0'
|
216
102
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
218
|
-
signing_key:
|
103
|
+
rubygems_version: 3.6.2
|
219
104
|
specification_version: 4
|
220
105
|
summary: API Client library for the Cloud AutoML API
|
221
106
|
test_files: []
|