Class: Google::Cloud::AIPlatform::V1::JobService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/ai_platform/v1/job_service/client.rb

Overview

Client for the JobService service.

A service for creating and managing Vertex AI's jobs.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#batch_prediction_job_path, #context_path, #custom_job_path, #data_labeling_job_path, #dataset_path, #endpoint_path, #hyperparameter_tuning_job_path, #location_path, #model_deployment_monitoring_job_path, #model_path, #nas_job_path, #nas_trial_detail_path, #network_path, #notification_channel_path, #persistent_resource_path, #reservation_path, #tensorboard_path, #trial_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new JobService client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AIPlatform::V1::JobService::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the JobService client.

Yield Parameters:



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 126

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/aiplatform/v1/job_service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @job_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::AIPlatform::V1::JobService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool
  )

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @job_service_stub.endpoint
    config.universe_domain = @job_service_stub.universe_domain
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @job_service_stub.endpoint
    config.universe_domain = @job_service_stub.universe_domain
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


206
207
208
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 206

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


199
200
201
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 199

def location_client
  @location_client
end

#operations_client::Google::Cloud::AIPlatform::V1::JobService::Operations (readonly)

Get the associated client for long-running operations.



192
193
194
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 192

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the JobService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all JobService clients
::Google::Cloud::AIPlatform::V1::JobService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 64

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "AIPlatform", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#cancel_batch_prediction_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_batch_prediction_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetBatchPredictionJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its BatchPredictionJob.state is set to CANCELLED. Any files already outputted by the job are not deleted.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest.new

# Call the cancel_batch_prediction_job method.
result = client.cancel_batch_prediction_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_batch_prediction_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_batch_prediction_job via a request object, either of type CancelBatchPredictionJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #cancel_batch_prediction_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2839

def cancel_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :cancel_batch_prediction_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_custom_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_custom_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetCustomJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a CustomJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelCustomJobRequest.new

# Call the cancel_custom_job method.
result = client.cancel_custom_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_custom_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_custom_job via a request object, either of type CancelCustomJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelCustomJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #cancel_custom_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 666

def cancel_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :cancel_custom_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_data_labeling_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_data_labeling_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest.new

# Call the cancel_data_labeling_job method.
result = client.cancel_data_labeling_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_data_labeling_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_data_labeling_job via a request object, either of type CancelDataLabelingJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #cancel_data_labeling_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1153

def cancel_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :cancel_data_labeling_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_hyperparameter_tuning_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetHyperparameterTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a HyperparameterTuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest.new

# Call the cancel_hyperparameter_tuning_job method.
result = client.cancel_hyperparameter_tuning_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_hyperparameter_tuning_job via a request object, either of type CancelHyperparameterTuningJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #cancel_hyperparameter_tuning_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1653

def cancel_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :cancel_hyperparameter_tuning_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_nas_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_nas_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetNasJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a NasJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and NasJob.state is set to CANCELLED.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelNasJobRequest.new

# Call the cancel_nas_job method.
result = client.cancel_nas_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_nas_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_nas_job via a request object, either of type CancelNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelNasJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #cancel_nas_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_nas_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob to cancel. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2150

def cancel_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :cancel_nas_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the JobService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



96
97
98
99
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 96

def configure
  yield @config if block_given?
  @config
end

#create_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob #create_batch_prediction_job(parent: nil, batch_prediction_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest.new

# Call the create_batch_prediction_job method.
result = client.create_batch_prediction_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchPredictionJob.
p result

Overloads:

  • #create_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

    Pass arguments to create_batch_prediction_job via a request object, either of type CreateBatchPredictionJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_batch_prediction_job(parent: nil, batch_prediction_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

    Pass arguments to create_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to create the BatchPredictionJob in. Format: projects/{project}/locations/{location}

    • batch_prediction_job (::Google::Cloud::AIPlatform::V1::BatchPredictionJob, ::Hash) (defaults to: nil)

      Required. The BatchPredictionJob to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2430

def create_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_batch_prediction_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob #create_custom_job(parent: nil, custom_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

Creates a CustomJob. A created CustomJob right away will be attempted to be run.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateCustomJobRequest.new

# Call the create_custom_job method.
result = client.create_custom_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::CustomJob.
p result

Overloads:

  • #create_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

    Pass arguments to create_custom_job via a request object, either of type CreateCustomJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateCustomJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_custom_job(parent: nil, custom_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

    Pass arguments to create_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}

    • custom_job (::Google::Cloud::AIPlatform::V1::CustomJob, ::Hash) (defaults to: nil)

      Required. The CustomJob to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 258

def create_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_custom_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob #create_data_labeling_job(parent: nil, data_labeling_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Creates a DataLabelingJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest.new

# Call the create_data_labeling_job method.
result = client.create_data_labeling_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::DataLabelingJob.
p result

Overloads:

  • #create_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

    Pass arguments to create_data_labeling_job via a request object, either of type CreateDataLabelingJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_data_labeling_job(parent: nil, data_labeling_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

    Pass arguments to create_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

    • data_labeling_job (::Google::Cloud::AIPlatform::V1::DataLabelingJob, ::Hash) (defaults to: nil)

      Required. The DataLabelingJob to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 755

def create_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_data_labeling_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob #create_hyperparameter_tuning_job(parent: nil, hyperparameter_tuning_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Creates a HyperparameterTuningJob

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest.new

# Call the create_hyperparameter_tuning_job method.
result = client.create_hyperparameter_tuning_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
p result

Overloads:

  • #create_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

    Pass arguments to create_hyperparameter_tuning_job via a request object, either of type CreateHyperparameterTuningJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_hyperparameter_tuning_job(parent: nil, hyperparameter_tuning_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

    Pass arguments to create_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: projects/{project}/locations/{location}

    • hyperparameter_tuning_job (::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob, ::Hash) (defaults to: nil)

      Required. The HyperparameterTuningJob to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1243

def create_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_hyperparameter_tuning_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob #create_model_deployment_monitoring_job(parent: nil, model_deployment_monitoring_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateModelDeploymentMonitoringJobRequest.new

# Call the create_model_deployment_monitoring_job method.
result = client.create_model_deployment_monitoring_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2929

def create_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_model_deployment_monitoring_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob #create_nas_job(parent: nil, nas_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

Creates a NasJob

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateNasJobRequest.new

# Call the create_nas_job method.
result = client.create_nas_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::NasJob.
p result

Overloads:

  • #create_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to create_nas_job via a request object, either of type CreateNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateNasJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_nas_job(parent: nil, nas_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to create_nas_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to create the NasJob in. Format: projects/{project}/locations/{location}

    • nas_job (::Google::Cloud::AIPlatform::V1::NasJob, ::Hash) (defaults to: nil)

      Required. The NasJob to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1742

def create_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :create_nas_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_batch_prediction_job(request, options = nil) ⇒ ::Gapic::Operation #delete_batch_prediction_job(name: nil) ⇒ ::Gapic::Operation

Deletes a BatchPredictionJob. Can only be called on jobs that already finished.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest.new

# Call the delete_batch_prediction_job method.
result = client.delete_batch_prediction_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_batch_prediction_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_batch_prediction_job via a request object, either of type DeleteBatchPredictionJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_batch_prediction_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the BatchPredictionJob resource to be deleted. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2739

def delete_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_batch_prediction_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_custom_job(request, options = nil) ⇒ ::Gapic::Operation #delete_custom_job(name: nil) ⇒ ::Gapic::Operation

Deletes a CustomJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest.new

# Call the delete_custom_job method.
result = client.delete_custom_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_custom_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_custom_job via a request object, either of type DeleteCustomJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_custom_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomJob resource to be deleted. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 565

def delete_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_custom_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_data_labeling_job(request, options = nil) ⇒ ::Gapic::Operation #delete_data_labeling_job(name: nil) ⇒ ::Gapic::Operation

Deletes a DataLabelingJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest.new

# Call the delete_data_labeling_job method.
result = client.delete_data_labeling_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_data_labeling_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_data_labeling_job via a request object, either of type DeleteDataLabelingJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_data_labeling_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataLabelingJob to be deleted. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1064

def delete_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_data_labeling_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_hyperparameter_tuning_job(request, options = nil) ⇒ ::Gapic::Operation #delete_hyperparameter_tuning_job(name: nil) ⇒ ::Gapic::Operation

Deletes a HyperparameterTuningJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest.new

# Call the delete_hyperparameter_tuning_job method.
result = client.delete_hyperparameter_tuning_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_hyperparameter_tuning_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hyperparameter_tuning_job via a request object, either of type DeleteHyperparameterTuningJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_hyperparameter_tuning_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the HyperparameterTuningJob resource to be deleted. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1551

def delete_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_hyperparameter_tuning_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation #delete_model_deployment_monitoring_job(name: nil) ⇒ ::Gapic::Operation

Deletes a ModelDeploymentMonitoringJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest.new

# Call the delete_model_deployment_monitoring_job method.
result = client.delete_model_deployment_monitoring_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_model_deployment_monitoring_job via a request object, either of type DeleteModelDeploymentMonitoringJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_model_deployment_monitoring_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3468

def delete_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_model_deployment_monitoring_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_nas_job(request, options = nil) ⇒ ::Gapic::Operation #delete_nas_job(name: nil) ⇒ ::Gapic::Operation

Deletes a NasJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteNasJobRequest.new

# Call the delete_nas_job method.
result = client.delete_nas_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_nas_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_nas_job via a request object, either of type DeleteNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteNasJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_nas_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_nas_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob resource to be deleted. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2049

def delete_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :delete_nas_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob #get_batch_prediction_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

Gets a BatchPredictionJob

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest.new

# Call the get_batch_prediction_job method.
result = client.get_batch_prediction_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchPredictionJob.
p result

Overloads:

  • #get_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

    Pass arguments to get_batch_prediction_job via a request object, either of type GetBatchPredictionJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_batch_prediction_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

    Pass arguments to get_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the BatchPredictionJob resource. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2518

def get_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_batch_prediction_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob #get_custom_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

Gets a CustomJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetCustomJobRequest.new

# Call the get_custom_job method.
result = client.get_custom_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::CustomJob.
p result

Overloads:

  • #get_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

    Pass arguments to get_custom_job via a request object, either of type GetCustomJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetCustomJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_custom_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

    Pass arguments to get_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomJob resource. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 346

def get_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_custom_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob #get_data_labeling_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Gets a DataLabelingJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest.new

# Call the get_data_labeling_job method.
result = client.get_data_labeling_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::DataLabelingJob.
p result

Overloads:

  • #get_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

    Pass arguments to get_data_labeling_job via a request object, either of type GetDataLabelingJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_labeling_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

    Pass arguments to get_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 843

def get_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_data_labeling_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob #get_hyperparameter_tuning_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Gets a HyperparameterTuningJob

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest.new

# Call the get_hyperparameter_tuning_job method.
result = client.get_hyperparameter_tuning_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
p result

Overloads:

  • #get_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

    Pass arguments to get_hyperparameter_tuning_job via a request object, either of type GetHyperparameterTuningJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_hyperparameter_tuning_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

    Pass arguments to get_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the HyperparameterTuningJob resource. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1331

def get_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_hyperparameter_tuning_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob #get_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

Gets a ModelDeploymentMonitoringJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetModelDeploymentMonitoringJobRequest.new

# Call the get_model_deployment_monitoring_job method.
result = client.get_model_deployment_monitoring_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
p result

Overloads:

  • #get_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

    Pass arguments to get_model_deployment_monitoring_job via a request object, either of type GetModelDeploymentMonitoringJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetModelDeploymentMonitoringJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

    Pass arguments to get_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3132

def get_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_model_deployment_monitoring_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob #get_nas_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

Gets a NasJob

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetNasJobRequest.new

# Call the get_nas_job method.
result = client.get_nas_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::NasJob.
p result

Overloads:

  • #get_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to get_nas_job via a request object, either of type GetNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetNasJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_nas_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to get_nas_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1830

def get_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_nas_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_nas_trial_detail(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail #get_nas_trial_detail(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

Gets a NasTrialDetail.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetNasTrialDetailRequest.new

# Call the get_nas_trial_detail method.
result = client.get_nas_trial_detail request

# The returned object is of type Google::Cloud::AIPlatform::V1::NasTrialDetail.
p result

Overloads:

  • #get_nas_trial_detail(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

    Pass arguments to get_nas_trial_detail via a request object, either of type GetNasTrialDetailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetNasTrialDetailRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_nas_trial_detail(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

    Pass arguments to get_nas_trial_detail via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the NasTrialDetail resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2238

def get_nas_trial_detail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNasTrialDetailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_nas_trial_detail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_nas_trial_detail.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_nas_trial_detail.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :get_nas_trial_detail, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_batch_prediction_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob> #list_batch_prediction_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>

Lists BatchPredictionJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListBatchPredictionJobsRequest.new

# Call the list_batch_prediction_jobs method.
result = client.list_batch_prediction_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::BatchPredictionJob.
  p item
end

Overloads:

  • #list_batch_prediction_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>

    Pass arguments to list_batch_prediction_jobs via a request object, either of type ListBatchPredictionJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListBatchPredictionJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_batch_prediction_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>

    Pass arguments to list_batch_prediction_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • model_display_name supports =, != comparisons.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListBatchPredictionJobsResponse.next_page_token of the previous JobService.ListBatchPredictionJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2642

def list_batch_prediction_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListBatchPredictionJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_batch_prediction_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_batch_prediction_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_batch_prediction_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_batch_prediction_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_batch_prediction_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_custom_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob> #list_custom_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>

Lists CustomJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListCustomJobsRequest.new

# Call the list_custom_jobs method.
result = client.list_custom_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::CustomJob.
  p item
end

Overloads:

  • #list_custom_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>

    Pass arguments to list_custom_jobs via a request object, either of type ListCustomJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListCustomJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_custom_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>

    Pass arguments to list_custom_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to list the CustomJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListCustomJobsResponse.next_page_token of the previous JobService.ListCustomJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 469

def list_custom_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListCustomJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_custom_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_custom_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_custom_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_custom_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_custom_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_data_labeling_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob> #list_data_labeling_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>

Lists DataLabelingJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListDataLabelingJobsRequest.new

# Call the list_data_labeling_jobs method.
result = client.list_data_labeling_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::DataLabelingJob.
  p item
end

Overloads:

  • #list_data_labeling_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>

    Pass arguments to list_data_labeling_jobs via a request object, either of type ListDataLabelingJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListDataLabelingJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_data_labeling_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>

    Pass arguments to list_data_labeling_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read. FieldMask represents a set of symbolic field paths. For example, the mask can be paths: "name". The "name" here is a field in DataLabelingJob. If this field is not set, all fields of the DataLabelingJob are returned.

    • order_by (::String) (defaults to: nil)

      A comma-separated list of fields to order by, sorted in ascending order by default. Use desc after a field name for descending.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 968

def list_data_labeling_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDataLabelingJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_data_labeling_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_data_labeling_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_data_labeling_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_data_labeling_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_data_labeling_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_hyperparameter_tuning_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob> #list_hyperparameter_tuning_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>

Lists HyperparameterTuningJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListHyperparameterTuningJobsRequest.new

# Call the list_hyperparameter_tuning_jobs method.
result = client.list_hyperparameter_tuning_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
  p item
end

Overloads:

  • #list_hyperparameter_tuning_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>

    Pass arguments to list_hyperparameter_tuning_jobs via a request object, either of type ListHyperparameterTuningJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListHyperparameterTuningJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_hyperparameter_tuning_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>

    Pass arguments to list_hyperparameter_tuning_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListHyperparameterTuningJobsResponse.next_page_token of the previous JobService.ListHyperparameterTuningJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1455

def list_hyperparameter_tuning_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListHyperparameterTuningJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_hyperparameter_tuning_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_hyperparameter_tuning_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_hyperparameter_tuning_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_hyperparameter_tuning_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_hyperparameter_tuning_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_model_deployment_monitoring_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob> #list_model_deployment_monitoring_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>

Lists ModelDeploymentMonitoringJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelDeploymentMonitoringJobsRequest.new

# Call the list_model_deployment_monitoring_jobs method.
result = client.list_model_deployment_monitoring_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
  p item
end

Overloads:

  • #list_model_deployment_monitoring_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>

    Pass arguments to list_model_deployment_monitoring_jobs via a request object, either of type ListModelDeploymentMonitoringJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListModelDeploymentMonitoringJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_model_deployment_monitoring_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>

    Pass arguments to list_model_deployment_monitoring_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3250

def list_model_deployment_monitoring_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelDeploymentMonitoringJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_model_deployment_monitoring_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_model_deployment_monitoring_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_model_deployment_monitoring_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_model_deployment_monitoring_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_model_deployment_monitoring_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_nas_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob> #list_nas_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

Lists NasJobs in a Location.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListNasJobsRequest.new

# Call the list_nas_jobs method.
result = client.list_nas_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::NasJob.
  p item
end

Overloads:

  • #list_nas_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

    Pass arguments to list_nas_jobs via a request object, either of type ListNasJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListNasJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_nas_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

    Pass arguments to list_nas_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the Location to list the NasJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListNasJobsResponse.next_page_token of the previous JobService.ListNasJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 1953

def list_nas_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNasJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_nas_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_nas_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_nas_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_nas_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_nas_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_nas_trial_details(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail> #list_nas_trial_details(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

List top NasTrialDetails of a NasJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListNasTrialDetailsRequest.new

# Call the list_nas_trial_details method.
result = client.list_nas_trial_details request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::NasTrialDetail.
  p item
end

Overloads:

  • #list_nas_trial_details(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

    Pass arguments to list_nas_trial_details via a request object, either of type ListNasTrialDetailsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListNasTrialDetailsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_nas_trial_details(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

    Pass arguments to list_nas_trial_details via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of the previous JobService.ListNasTrialDetails call.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 2339

def list_nas_trial_details request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNasTrialDetailsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_nas_trial_details..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_nas_trial_details.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_nas_trial_details.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :list_nas_trial_details, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_nas_trial_details, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#pause_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #pause_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Protobuf::Empty

Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to 'PAUSED'.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::PauseModelDeploymentMonitoringJobRequest.new

# Call the pause_model_deployment_monitoring_job method.
result = client.pause_model_deployment_monitoring_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #pause_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to pause_model_deployment_monitoring_job via a request object, either of type PauseModelDeploymentMonitoringJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::PauseModelDeploymentMonitoringJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #pause_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to pause_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3560

def pause_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PauseModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.pause_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.pause_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.pause_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :pause_model_deployment_monitoring_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#resume_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #resume_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Protobuf::Empty

Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ResumeModelDeploymentMonitoringJobRequest.new

# Call the resume_model_deployment_monitoring_job method.
result = client.resume_model_deployment_monitoring_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #resume_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to resume_model_deployment_monitoring_job via a request object, either of type ResumeModelDeploymentMonitoringJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ResumeModelDeploymentMonitoringJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #resume_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to resume_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3650

def resume_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ResumeModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.resume_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.resume_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.resume_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :resume_model_deployment_monitoring_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#search_model_deployment_monitoring_stats_anomalies(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies> #search_model_deployment_monitoring_stats_anomalies(model_deployment_monitoring_job: nil, deployed_model_id: nil, feature_display_name: nil, objectives: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>

Searches Model Monitoring Statistics generated within a given time window.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::SearchModelDeploymentMonitoringStatsAnomaliesRequest.new

# Call the search_model_deployment_monitoring_stats_anomalies method.
result = client.search_model_deployment_monitoring_stats_anomalies request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies.
  p item
end

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3043

def search_model_deployment_monitoring_stats_anomalies request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchModelDeploymentMonitoringStatsAnomaliesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.search_model_deployment_monitoring_stats_anomalies..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.model_deployment_monitoring_job
    header_params["model_deployment_monitoring_job"] = request.model_deployment_monitoring_job
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.search_model_deployment_monitoring_stats_anomalies.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_model_deployment_monitoring_stats_anomalies.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :search_model_deployment_monitoring_stats_anomalies, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @job_service_stub, :search_model_deployment_monitoring_stats_anomalies, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


106
107
108
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 106

def universe_domain
  @job_service_stub.universe_domain
end

#update_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation #update_model_deployment_monitoring_job(model_deployment_monitoring_job: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates a ModelDeploymentMonitoringJob.

Examples:

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UpdateModelDeploymentMonitoringJobRequest.new

# Call the update_model_deployment_monitoring_job method.
result = client.update_model_deployment_monitoring_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_model_deployment_monitoring_job via a request object, either of type UpdateModelDeploymentMonitoringJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::UpdateModelDeploymentMonitoringJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_model_deployment_monitoring_job(model_deployment_monitoring_job: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • model_deployment_monitoring_job (::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob, ::Hash) (defaults to: nil)

      Required. The model monitoring configuration which replaces the resource on the server.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to * to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.

      Updatable fields:

      • display_name
      • model_deployment_monitoring_schedule_config
      • model_monitoring_alert_config
      • logging_sampling_strategy
      • labels
      • log_ttl
      • enable_monitoring_pipeline_logs . and
      • model_deployment_monitoring_objective_configs . or
      • model_deployment_monitoring_objective_configs.objective_config.training_dataset
      • model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config
      • model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
# File 'lib/google/cloud/ai_platform/v1/job_service/client.rb', line 3372

def update_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.model_deployment_monitoring_job&.name
    header_params["model_deployment_monitoring_job.name"] = request.model_deployment_monitoring_job.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.call_rpc :update_model_deployment_monitoring_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end