google-cloud-ai_platform-v1 0.48.0 → 0.55.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +48 -0
  3. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +129 -0
  4. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +817 -0
  5. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/paths.rb +19 -0
  6. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +122 -0
  7. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +4181 -0
  8. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +60 -0
  9. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +1 -0
  10. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +1 -0
  11. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +4 -1
  12. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +4 -1
  13. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +3 -1
  14. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +3 -1
  15. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +32 -6
  16. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +32 -6
  17. data/lib/google/cloud/ai_platform/v1/schedule_service/paths.rb +38 -0
  18. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  19. data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +1 -1
  20. data/lib/google/cloud/aiplatform/v1/content_pb.rb +9 -1
  21. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +1 -1
  22. data/lib/google/cloud/aiplatform/v1/data_item_pb.rb +1 -1
  23. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
  24. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  25. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +1 -1
  26. data/lib/google/cloud/aiplatform/v1/entity_type_pb.rb +1 -1
  27. data/lib/google/cloud/aiplatform/v1/feature_group_pb.rb +2 -1
  28. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +1 -1
  29. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -1
  30. data/lib/google/cloud/aiplatform/v1/feature_view_sync_pb.rb +1 -1
  31. data/lib/google/cloud/aiplatform/v1/featurestore_pb.rb +1 -1
  32. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_pb.rb +8 -1
  33. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_services_pb.rb +4 -0
  34. data/lib/google/cloud/aiplatform/v1/hyperparameter_tuning_job_pb.rb +1 -1
  35. data/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +1 -1
  36. data/lib/google/cloud/aiplatform/v1/index_pb.rb +1 -1
  37. data/lib/google/cloud/aiplatform/v1/model_deployment_monitoring_job_pb.rb +1 -1
  38. data/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +1 -1
  39. data/lib/google/cloud/aiplatform/v1/nas_job_pb.rb +1 -1
  40. data/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb +3 -1
  41. data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +1 -1
  42. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  43. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  44. data/lib/google/cloud/aiplatform/v1/schedule_pb.rb +3 -1
  45. data/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +2 -1
  46. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +3 -1
  47. data/lib/google/cloud/aiplatform/v1/tuning_job_pb.rb +2 -1
  48. data/proto_docs/google/api/client.rb +31 -0
  49. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +6 -0
  50. data/proto_docs/google/cloud/aiplatform/v1/content.rb +142 -14
  51. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +20 -5
  52. data/proto_docs/google/cloud/aiplatform/v1/data_item.rb +6 -0
  53. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +6 -0
  54. data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +6 -0
  55. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +6 -0
  56. data/proto_docs/google/cloud/aiplatform/v1/entity_type.rb +6 -0
  57. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +34 -0
  58. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +6 -0
  59. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_admin_service.rb +1 -1
  60. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +35 -0
  61. data/proto_docs/google/cloud/aiplatform/v1/feature_view_sync.rb +10 -0
  62. data/proto_docs/google/cloud/aiplatform/v1/featurestore.rb +6 -0
  63. data/proto_docs/google/cloud/aiplatform/v1/genai_tuning_service.rb +36 -0
  64. data/proto_docs/google/cloud/aiplatform/v1/hyperparameter_tuning_job.rb +6 -0
  65. data/proto_docs/google/cloud/aiplatform/v1/index.rb +6 -0
  66. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +11 -0
  67. data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +6 -0
  68. data/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb +3 -0
  69. data/proto_docs/google/cloud/aiplatform/v1/nas_job.rb +6 -0
  70. data/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +5 -0
  71. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +11 -2
  72. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +33 -2
  73. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +3 -0
  74. data/proto_docs/google/cloud/aiplatform/v1/schedule.rb +4 -0
  75. data/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +23 -0
  76. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +28 -3
  77. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +26 -1
  78. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a2575dd0d4500a8eecf92ce9e1c7176a51effffc1957f000d124ffdea20cef9
4
- data.tar.gz: 826b04b88754cfaf266530b6573764aad6d8e42ef3a89e596842fc806c4e626f
3
+ metadata.gz: 292afb58f3cdf4ff9b22dbbc1ca24184910ed35aff12f3b2788d131d594c4f72
4
+ data.tar.gz: 7a0fd8ad2d6c4cc1708b03a0ad6cb8463ce464a69c8ff3f26c0c9c215a66d0e4
5
5
  SHA512:
6
- metadata.gz: a57dcb05530edefa51f6fdb19c77c56e20620221eb065a3720d639285df129719cf7e37929999cdb0037922218206790d19eee0ad2ebe678966162edec54d1e2
7
- data.tar.gz: 9f21df7f67c69370fb2db35fc8941b47f03e3f73887c7c59190bad8fcf82c7f5d8e7aa6bbdb4d03cf545b66538636aca35dc43fc95f04471ee86afed165b2961
6
+ metadata.gz: e29510b89343e267a882cdf9d2f83ffd901e5317c223472d598065a328291db04c9df721aba7461c7b4a6d687a7fb2481c2e812ad5484bb51602ebe71c40f832
7
+ data.tar.gz: 8fd987400b2a37917694c9dbafebca57f2cde883519e0c02d9de26fd60c826495c3ff1bfd398cbc8bd830bc81e60d9de7d5cfe4727584fb38588f97ab045a1d7
@@ -114,6 +114,22 @@ module Google
114
114
  ],
115
115
  body: nil
116
116
  ),
117
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
118
+ uri_method: :post,
119
+ uri_template: "/v1/{resource}:getIamPolicy",
120
+ matches: [
121
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/?$}, false]
122
+ ],
123
+ body: nil
124
+ ),
125
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
126
+ uri_method: :post,
127
+ uri_template: "/v1/{resource}:getIamPolicy",
128
+ matches: [
129
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/?$}, false]
130
+ ],
131
+ body: nil
132
+ ),
117
133
  Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
118
134
  uri_method: :post,
119
135
  uri_template: "/ui/{resource}:getIamPolicy",
@@ -213,6 +229,22 @@ module Google
213
229
  ],
214
230
  body: "*"
215
231
  ),
232
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
233
+ uri_method: :post,
234
+ uri_template: "/v1/{resource}:setIamPolicy",
235
+ matches: [
236
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/?$}, false]
237
+ ],
238
+ body: "*"
239
+ ),
240
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
241
+ uri_method: :post,
242
+ uri_template: "/v1/{resource}:setIamPolicy",
243
+ matches: [
244
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/?$}, false]
245
+ ],
246
+ body: "*"
247
+ ),
216
248
  Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
217
249
  uri_method: :post,
218
250
  uri_template: "/ui/{resource}:setIamPolicy",
@@ -304,6 +336,22 @@ module Google
304
336
  ],
305
337
  body: nil
306
338
  ),
339
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
340
+ uri_method: :post,
341
+ uri_template: "/v1/{resource}:testIamPermissions",
342
+ matches: [
343
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/?$}, false]
344
+ ],
345
+ body: nil
346
+ ),
347
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
348
+ uri_method: :post,
349
+ uri_template: "/v1/{resource}:testIamPermissions",
350
+ matches: [
351
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+/?$}, false]
352
+ ],
353
+ body: nil
354
+ ),
307
355
  Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
308
356
  uri_method: :post,
309
357
  uri_template: "/ui/{resource}:testIamPermissions",
@@ -151,6 +151,13 @@ module Google
151
151
  @quota_project_id = @config.quota_project
152
152
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
153
 
154
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
154
161
  @gen_ai_tuning_service_stub = ::Gapic::ServiceStub.new(
155
162
  ::Google::Cloud::AIPlatform::V1::GenAiTuningService::Stub,
156
163
  credentials: credentials,
@@ -177,6 +184,13 @@ module Google
177
184
  end
178
185
  end
179
186
 
187
+ ##
188
+ # Get the associated client for long-running operations.
189
+ #
190
+ # @return [::Google::Cloud::AIPlatform::V1::GenAiTuningService::Operations]
191
+ #
192
+ attr_reader :operations_client
193
+
180
194
  ##
181
195
  # Get the associated client for mix-in of the Locations.
182
196
  #
@@ -568,6 +582,114 @@ module Google
568
582
  raise ::Google::Cloud::Error.from_error(e)
569
583
  end
570
584
 
585
+ ##
586
+ # Rebase a TunedModel.
587
+ # Creates a LongRunningOperation that takes a legacy Tuned GenAI model
588
+ # Reference and creates a TuningJob based on newly available model.
589
+ #
590
+ # @overload rebase_tuned_model(request, options = nil)
591
+ # Pass arguments to `rebase_tuned_model` via a request object, either of type
592
+ # {::Google::Cloud::AIPlatform::V1::RebaseTunedModelRequest} or an equivalent Hash.
593
+ #
594
+ # @param request [::Google::Cloud::AIPlatform::V1::RebaseTunedModelRequest, ::Hash]
595
+ # A request object representing the call parameters. Required. To specify no
596
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
597
+ # @param options [::Gapic::CallOptions, ::Hash]
598
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
599
+ #
600
+ # @overload rebase_tuned_model(parent: nil, tuned_model_ref: nil, tuning_job: nil, artifact_destination: nil, deploy_to_same_endpoint: nil)
601
+ # Pass arguments to `rebase_tuned_model` via keyword arguments. Note that at
602
+ # least one keyword argument is required. To specify no parameters, or to keep all
603
+ # the default parameter values, pass an empty Hash as a request object (see above).
604
+ #
605
+ # @param parent [::String]
606
+ # Required. The resource name of the Location into which to rebase the Model.
607
+ # Format: `projects/{project}/locations/{location}`
608
+ # @param tuned_model_ref [::Google::Cloud::AIPlatform::V1::TunedModelRef, ::Hash]
609
+ # Required. TunedModel reference to retrieve the legacy model information.
610
+ # @param tuning_job [::Google::Cloud::AIPlatform::V1::TuningJob, ::Hash]
611
+ # Optional. The TuningJob to be updated. Users can use this TuningJob field
612
+ # to overwrite tuning configs.
613
+ # @param artifact_destination [::Google::Cloud::AIPlatform::V1::GcsDestination, ::Hash]
614
+ # Optional. The Google Cloud Storage location to write the artifacts.
615
+ # @param deploy_to_same_endpoint [::Boolean]
616
+ # Optional. By default, bison to gemini migration will always create new
617
+ # model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
618
+ # deploy to the same endpoint. See details in this Section.
619
+ #
620
+ # @yield [response, operation] Access the result along with the RPC operation
621
+ # @yieldparam response [::Gapic::Operation]
622
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
623
+ #
624
+ # @return [::Gapic::Operation]
625
+ #
626
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
627
+ #
628
+ # @example Basic example
629
+ # require "google/cloud/ai_platform/v1"
630
+ #
631
+ # # Create a client object. The client can be reused for multiple calls.
632
+ # client = Google::Cloud::AIPlatform::V1::GenAiTuningService::Client.new
633
+ #
634
+ # # Create a request. To set request fields, pass in keyword arguments.
635
+ # request = Google::Cloud::AIPlatform::V1::RebaseTunedModelRequest.new
636
+ #
637
+ # # Call the rebase_tuned_model method.
638
+ # result = client.rebase_tuned_model request
639
+ #
640
+ # # The returned object is of type Gapic::Operation. You can use it to
641
+ # # check the status of an operation, cancel it, or wait for results.
642
+ # # Here is how to wait for a response.
643
+ # result.wait_until_done! timeout: 60
644
+ # if result.response?
645
+ # p result.response
646
+ # else
647
+ # puts "No response received."
648
+ # end
649
+ #
650
+ def rebase_tuned_model request, options = nil
651
+ raise ::ArgumentError, "request must be provided" if request.nil?
652
+
653
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RebaseTunedModelRequest
654
+
655
+ # Converts hash and nil to an options object
656
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
657
+
658
+ # Customize the options with defaults
659
+ metadata = @config.rpcs.rebase_tuned_model.metadata.to_h
660
+
661
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
662
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
663
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
664
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
665
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
666
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
667
+
668
+ header_params = {}
669
+ if request.parent
670
+ header_params["parent"] = request.parent
671
+ end
672
+
673
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
674
+ metadata[:"x-goog-request-params"] ||= request_params_header
675
+
676
+ options.apply_defaults timeout: @config.rpcs.rebase_tuned_model.timeout,
677
+ metadata: metadata,
678
+ retry_policy: @config.rpcs.rebase_tuned_model.retry_policy
679
+
680
+ options.apply_defaults timeout: @config.timeout,
681
+ metadata: @config.metadata,
682
+ retry_policy: @config.retry_policy
683
+
684
+ @gen_ai_tuning_service_stub.call_rpc :rebase_tuned_model, request, options: options do |response, operation|
685
+ response = ::Gapic::Operation.new response, @operations_client, options: options
686
+ yield response, operation if block_given?
687
+ return response
688
+ end
689
+ rescue ::GRPC::BadStatus => e
690
+ raise ::Google::Cloud::Error.from_error(e)
691
+ end
692
+
571
693
  ##
572
694
  # Configuration class for the GenAiTuningService API.
573
695
  #
@@ -741,6 +863,11 @@ module Google
741
863
  # @return [::Gapic::Config::Method]
742
864
  #
743
865
  attr_reader :cancel_tuning_job
866
+ ##
867
+ # RPC-specific configuration for `rebase_tuned_model`
868
+ # @return [::Gapic::Config::Method]
869
+ #
870
+ attr_reader :rebase_tuned_model
744
871
 
745
872
  # @private
746
873
  def initialize parent_rpcs = nil
@@ -752,6 +879,8 @@ module Google
752
879
  @list_tuning_jobs = ::Gapic::Config::Method.new list_tuning_jobs_config
753
880
  cancel_tuning_job_config = parent_rpcs.cancel_tuning_job if parent_rpcs.respond_to? :cancel_tuning_job
754
881
  @cancel_tuning_job = ::Gapic::Config::Method.new cancel_tuning_job_config
882
+ rebase_tuned_model_config = parent_rpcs.rebase_tuned_model if parent_rpcs.respond_to? :rebase_tuned_model
883
+ @rebase_tuned_model = ::Gapic::Config::Method.new rebase_tuned_model_config
755
884
 
756
885
  yield self if block_given?
757
886
  end