google-cloud-tpu-v1 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/tpu/v1/tpu/client.rb +62 -47
- data/lib/google/cloud/tpu/v1/tpu/operations.rb +30 -21
- data/lib/google/cloud/tpu/v1/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dd28927088103b60cc1f2d85c96ca70021921b8058c454ea0f3e88d007089b8
|
4
|
+
data.tar.gz: 2d657b3bbcf30b0cedc91f006e9c1fe515859ca94e2a63677166a094c0cbc5a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2313bcb05cf16483c339be0874a273ab260e98c6f5bed761a358aadef389b3874b9a5611492a45c9b562da719ba93e576f78af929694ea6747da5496db9a67b
|
7
|
+
data.tar.gz: 2ae8d8519bc98ef5086433d9f03c5a743ab9e2e4851c1dca992b3850c6dfa53ab4550af3052ba8192ca181a8f72ac98280e297d1c99326a7b7302d185faed3a7
|
@@ -43,13 +43,12 @@ module Google
|
|
43
43
|
# See {::Google::Cloud::Tpu::V1::Tpu::Client::Configuration}
|
44
44
|
# for a description of the configuration fields.
|
45
45
|
#
|
46
|
-
#
|
46
|
+
# @example
|
47
47
|
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# end
|
48
|
+
# # Modify the configuration for all Tpu clients
|
49
|
+
# ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
53
52
|
#
|
54
53
|
# @yield [config] Configure the Client client.
|
55
54
|
# @yieldparam config [Client::Configuration]
|
@@ -98,19 +97,15 @@ module Google
|
|
98
97
|
##
|
99
98
|
# Create a new Tpu client object.
|
100
99
|
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
# To create a new Tpu client with the default
|
104
|
-
# configuration:
|
105
|
-
#
|
106
|
-
# client = ::Google::Cloud::Tpu::V1::Tpu::Client.new
|
100
|
+
# @example
|
107
101
|
#
|
108
|
-
#
|
109
|
-
#
|
102
|
+
# # Create a client using the default configuration
|
103
|
+
# client = ::Google::Cloud::Tpu::V1::Tpu::Client.new
|
110
104
|
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
105
|
+
# # Create a client using a custom configuration
|
106
|
+
# client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config|
|
107
|
+
# config.timeout = 10.0
|
108
|
+
# end
|
114
109
|
#
|
115
110
|
# @yield [config] Configure the Tpu client.
|
116
111
|
# @yieldparam config [Client::Configuration]
|
@@ -130,10 +125,9 @@ module Google
|
|
130
125
|
|
131
126
|
# Create credentials
|
132
127
|
credentials = @config.credentials
|
133
|
-
# Use self-signed JWT if the
|
128
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
134
129
|
# but only if the default endpoint does not have a region prefix.
|
135
|
-
enable_self_signed_jwt = @config.
|
136
|
-
@config.endpoint == Client.configure.endpoint &&
|
130
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
137
131
|
!@config.endpoint.split(".").first.include?("-")
|
138
132
|
credentials ||= Credentials.default scope: @config.scope,
|
139
133
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -225,7 +219,9 @@ module Google
|
|
225
219
|
options.apply_defaults timeout: @config.rpcs.list_nodes.timeout,
|
226
220
|
metadata: metadata,
|
227
221
|
retry_policy: @config.rpcs.list_nodes.retry_policy
|
228
|
-
|
222
|
+
|
223
|
+
options.apply_defaults timeout: @config.timeout,
|
224
|
+
metadata: @config.metadata,
|
229
225
|
retry_policy: @config.retry_policy
|
230
226
|
|
231
227
|
@tpu_stub.call_rpc :list_nodes, request, options: options do |response, operation|
|
@@ -292,7 +288,9 @@ module Google
|
|
292
288
|
options.apply_defaults timeout: @config.rpcs.get_node.timeout,
|
293
289
|
metadata: metadata,
|
294
290
|
retry_policy: @config.rpcs.get_node.retry_policy
|
295
|
-
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.timeout,
|
293
|
+
metadata: @config.metadata,
|
296
294
|
retry_policy: @config.retry_policy
|
297
295
|
|
298
296
|
@tpu_stub.call_rpc :get_node, request, options: options do |response, operation|
|
@@ -362,7 +360,9 @@ module Google
|
|
362
360
|
options.apply_defaults timeout: @config.rpcs.create_node.timeout,
|
363
361
|
metadata: metadata,
|
364
362
|
retry_policy: @config.rpcs.create_node.retry_policy
|
365
|
-
|
363
|
+
|
364
|
+
options.apply_defaults timeout: @config.timeout,
|
365
|
+
metadata: @config.metadata,
|
366
366
|
retry_policy: @config.retry_policy
|
367
367
|
|
368
368
|
@tpu_stub.call_rpc :create_node, request, options: options do |response, operation|
|
@@ -429,7 +429,9 @@ module Google
|
|
429
429
|
options.apply_defaults timeout: @config.rpcs.delete_node.timeout,
|
430
430
|
metadata: metadata,
|
431
431
|
retry_policy: @config.rpcs.delete_node.retry_policy
|
432
|
-
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
433
435
|
retry_policy: @config.retry_policy
|
434
436
|
|
435
437
|
@tpu_stub.call_rpc :delete_node, request, options: options do |response, operation|
|
@@ -498,7 +500,9 @@ module Google
|
|
498
500
|
options.apply_defaults timeout: @config.rpcs.reimage_node.timeout,
|
499
501
|
metadata: metadata,
|
500
502
|
retry_policy: @config.rpcs.reimage_node.retry_policy
|
501
|
-
|
503
|
+
|
504
|
+
options.apply_defaults timeout: @config.timeout,
|
505
|
+
metadata: @config.metadata,
|
502
506
|
retry_policy: @config.retry_policy
|
503
507
|
|
504
508
|
@tpu_stub.call_rpc :reimage_node, request, options: options do |response, operation|
|
@@ -565,7 +569,9 @@ module Google
|
|
565
569
|
options.apply_defaults timeout: @config.rpcs.stop_node.timeout,
|
566
570
|
metadata: metadata,
|
567
571
|
retry_policy: @config.rpcs.stop_node.retry_policy
|
568
|
-
|
572
|
+
|
573
|
+
options.apply_defaults timeout: @config.timeout,
|
574
|
+
metadata: @config.metadata,
|
569
575
|
retry_policy: @config.retry_policy
|
570
576
|
|
571
577
|
@tpu_stub.call_rpc :stop_node, request, options: options do |response, operation|
|
@@ -632,7 +638,9 @@ module Google
|
|
632
638
|
options.apply_defaults timeout: @config.rpcs.start_node.timeout,
|
633
639
|
metadata: metadata,
|
634
640
|
retry_policy: @config.rpcs.start_node.retry_policy
|
635
|
-
|
641
|
+
|
642
|
+
options.apply_defaults timeout: @config.timeout,
|
643
|
+
metadata: @config.metadata,
|
636
644
|
retry_policy: @config.retry_policy
|
637
645
|
|
638
646
|
@tpu_stub.call_rpc :start_node, request, options: options do |response, operation|
|
@@ -707,7 +715,9 @@ module Google
|
|
707
715
|
options.apply_defaults timeout: @config.rpcs.list_tensor_flow_versions.timeout,
|
708
716
|
metadata: metadata,
|
709
717
|
retry_policy: @config.rpcs.list_tensor_flow_versions.retry_policy
|
710
|
-
|
718
|
+
|
719
|
+
options.apply_defaults timeout: @config.timeout,
|
720
|
+
metadata: @config.metadata,
|
711
721
|
retry_policy: @config.retry_policy
|
712
722
|
|
713
723
|
@tpu_stub.call_rpc :list_tensor_flow_versions, request, options: options do |response, operation|
|
@@ -774,7 +784,9 @@ module Google
|
|
774
784
|
options.apply_defaults timeout: @config.rpcs.get_tensor_flow_version.timeout,
|
775
785
|
metadata: metadata,
|
776
786
|
retry_policy: @config.rpcs.get_tensor_flow_version.retry_policy
|
777
|
-
|
787
|
+
|
788
|
+
options.apply_defaults timeout: @config.timeout,
|
789
|
+
metadata: @config.metadata,
|
778
790
|
retry_policy: @config.retry_policy
|
779
791
|
|
780
792
|
@tpu_stub.call_rpc :get_tensor_flow_version, request, options: options do |response, operation|
|
@@ -848,7 +860,9 @@ module Google
|
|
848
860
|
options.apply_defaults timeout: @config.rpcs.list_accelerator_types.timeout,
|
849
861
|
metadata: metadata,
|
850
862
|
retry_policy: @config.rpcs.list_accelerator_types.retry_policy
|
851
|
-
|
863
|
+
|
864
|
+
options.apply_defaults timeout: @config.timeout,
|
865
|
+
metadata: @config.metadata,
|
852
866
|
retry_policy: @config.retry_policy
|
853
867
|
|
854
868
|
@tpu_stub.call_rpc :list_accelerator_types, request, options: options do |response, operation|
|
@@ -915,7 +929,9 @@ module Google
|
|
915
929
|
options.apply_defaults timeout: @config.rpcs.get_accelerator_type.timeout,
|
916
930
|
metadata: metadata,
|
917
931
|
retry_policy: @config.rpcs.get_accelerator_type.retry_policy
|
918
|
-
|
932
|
+
|
933
|
+
options.apply_defaults timeout: @config.timeout,
|
934
|
+
metadata: @config.metadata,
|
919
935
|
retry_policy: @config.retry_policy
|
920
936
|
|
921
937
|
@tpu_stub.call_rpc :get_accelerator_type, request, options: options do |response, operation|
|
@@ -939,22 +955,21 @@ module Google
|
|
939
955
|
# Configuration can be applied globally to all clients, or to a single client
|
940
956
|
# on construction.
|
941
957
|
#
|
942
|
-
#
|
943
|
-
#
|
944
|
-
#
|
945
|
-
# to 20 seconds,
|
946
|
-
#
|
947
|
-
#
|
948
|
-
#
|
949
|
-
#
|
950
|
-
#
|
951
|
-
#
|
952
|
-
#
|
953
|
-
#
|
954
|
-
#
|
955
|
-
#
|
956
|
-
#
|
957
|
-
# end
|
958
|
+
# @example
|
959
|
+
#
|
960
|
+
# # Modify the global config, setting the timeout for
|
961
|
+
# # list_nodes to 20 seconds,
|
962
|
+
# # and all remaining timeouts to 10 seconds.
|
963
|
+
# ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config|
|
964
|
+
# config.timeout = 10.0
|
965
|
+
# config.rpcs.list_nodes.timeout = 20.0
|
966
|
+
# end
|
967
|
+
#
|
968
|
+
# # Apply the above configuration only to a new client.
|
969
|
+
# client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config|
|
970
|
+
# config.timeout = 10.0
|
971
|
+
# config.rpcs.list_nodes.timeout = 20.0
|
972
|
+
# end
|
958
973
|
#
|
959
974
|
# @!attribute [rw] endpoint
|
960
975
|
# The hostname or hostname:port of the service endpoint.
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-tpu-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|