- 0.58.0 (latest)
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::VizierService::Client.
Client for the VizierService service.
Vertex AI Vizier API.
Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the VizierService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all VizierService clients ::Google::Cloud::AIPlatform::V1::VizierService::Client.configure do |config| config.timeout = 10.0 end
#add_trial_measurement
def add_trial_measurement(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
def add_trial_measurement(trial_name: nil, measurement: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
Adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete.
def add_trial_measurement(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
add_trial_measurement
via a request object, either of type
AddTrialMeasurementRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def add_trial_measurement(trial_name: nil, measurement: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
add_trial_measurement
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).
-
trial_name (::String) — Required. The name of the trial to add measurement.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- measurement (::Google::Cloud::AIPlatform::V1::Measurement, ::Hash) — Required. The measurement to be added to a Trial.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Trial)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest.new # Call the add_trial_measurement method. result = client.add_trial_measurement request # The returned object is of type Google::Cloud::AIPlatform::V1::Trial. p result
#check_trial_early_stopping_state
def check_trial_early_stopping_state(request, options = nil) -> ::Gapic::Operation
def check_trial_early_stopping_state(trial_name: nil) -> ::Gapic::Operation
Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].
def check_trial_early_stopping_state(request, options = nil) -> ::Gapic::Operation
check_trial_early_stopping_state
via a request object, either of type
CheckTrialEarlyStoppingStateRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def check_trial_early_stopping_state(trial_name: nil) -> ::Gapic::Operation
check_trial_early_stopping_state
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).
-
trial_name (::String) — Required. The Trial's name.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest.new # Call the check_trial_early_stopping_state method. result = client.check_trial_early_stopping_state request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#complete_trial
def complete_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
def complete_trial(name: nil, final_measurement: nil, trial_infeasible: nil, infeasible_reason: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
Marks a Trial as complete.
def complete_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
complete_trial
via a request object, either of type
CompleteTrialRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CompleteTrialRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def complete_trial(name: nil, final_measurement: nil, trial_infeasible: nil, infeasible_reason: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
complete_trial
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).
-
name (::String) — Required. The Trial's name.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- final_measurement (::Google::Cloud::AIPlatform::V1::Measurement, ::Hash) — Optional. If provided, it will be used as the completed Trial's final_measurement; Otherwise, the service will auto-select a previously reported measurement as the final-measurement
- trial_infeasible (::Boolean) — Optional. True if the Trial cannot be run with the given Parameter, and final_measurement will be ignored.
-
infeasible_reason (::String) — Optional. A human readable reason why the trial was infeasible. This should
only be provided if
trial_infeasible
is true.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Trial)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CompleteTrialRequest.new # Call the complete_trial method. result = client.complete_trial request # The returned object is of type Google::Cloud::AIPlatform::V1::Trial. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the VizierService 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 Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_study
def create_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
def create_study(parent: nil, study: nil) -> ::Google::Cloud::AIPlatform::V1::Study
Creates a Study. A resource name will be generated after creation of the Study.
def create_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
create_study
via a request object, either of type
CreateStudyRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CreateStudyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_study(parent: nil, study: nil) -> ::Google::Cloud::AIPlatform::V1::Study
create_study
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).
-
parent (::String) — Required. The resource name of the Location to create the CustomJob in.
Format:
projects/{project}/locations/{location}
- study (::Google::Cloud::AIPlatform::V1::Study, ::Hash) — Required. The Study configuration used to create the Study.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Study)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CreateStudyRequest.new # Call the create_study method. result = client.create_study request # The returned object is of type Google::Cloud::AIPlatform::V1::Study. p result
#create_trial
def create_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
def create_trial(parent: nil, trial: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
Adds a user provided Trial to a Study.
def create_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
create_trial
via a request object, either of type
CreateTrialRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CreateTrialRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_trial(parent: nil, trial: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
create_trial
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).
-
parent (::String) — Required. The resource name of the Study to create the Trial in.
Format:
projects/{project}/locations/{location}/studies/{study}
- trial (::Google::Cloud::AIPlatform::V1::Trial, ::Hash) — Required. The Trial to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Trial)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CreateTrialRequest.new # Call the create_trial method. result = client.create_trial request # The returned object is of type Google::Cloud::AIPlatform::V1::Trial. p result
#delete_study
def delete_study(request, options = nil) -> ::Google::Protobuf::Empty
def delete_study(name: nil) -> ::Google::Protobuf::Empty
Deletes a Study.
def delete_study(request, options = nil) -> ::Google::Protobuf::Empty
delete_study
via a request object, either of type
DeleteStudyRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteStudyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_study(name: nil) -> ::Google::Protobuf::Empty
delete_study
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).
-
name (::String) — Required. The name of the Study resource to be deleted.
Format:
projects/{project}/locations/{location}/studies/{study}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteStudyRequest.new # Call the delete_study method. result = client.delete_study request # The returned object is of type Google::Protobuf::Empty. p result
#delete_trial
def delete_trial(request, options = nil) -> ::Google::Protobuf::Empty
def delete_trial(name: nil) -> ::Google::Protobuf::Empty
Deletes a Trial.
def delete_trial(request, options = nil) -> ::Google::Protobuf::Empty
delete_trial
via a request object, either of type
DeleteTrialRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteTrialRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_trial(name: nil) -> ::Google::Protobuf::Empty
delete_trial
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).
-
name (::String) — Required. The Trial's name.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteTrialRequest.new # Call the delete_trial method. result = client.delete_trial request # The returned object is of type Google::Protobuf::Empty. p result
#get_study
def get_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
def get_study(name: nil) -> ::Google::Cloud::AIPlatform::V1::Study
Gets a Study by name.
def get_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
get_study
via a request object, either of type
GetStudyRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetStudyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_study(name: nil) -> ::Google::Cloud::AIPlatform::V1::Study
get_study
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).
-
name (::String) — Required. The name of the Study resource.
Format:
projects/{project}/locations/{location}/studies/{study}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Study)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetStudyRequest.new # Call the get_study method. result = client.get_study request # The returned object is of type Google::Cloud::AIPlatform::V1::Study. p result
#get_trial
def get_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
def get_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
Gets a Trial.
def get_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
get_trial
via a request object, either of type
GetTrialRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetTrialRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
get_trial
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).
-
name (::String) — Required. The name of the Trial resource.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Trial)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetTrialRequest.new # Call the get_trial method. result = client.get_trial request # The returned object is of type Google::Cloud::AIPlatform::V1::Trial. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new VizierService client object.
- (config) — Configure the VizierService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AIPlatform::V1::VizierService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AIPlatform::V1::VizierService::Client.new do |config| config.timeout = 10.0 end
#list_optimal_trials
def list_optimal_trials(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse
def list_optimal_trials(parent: nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse
Lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
def list_optimal_trials(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse
list_optimal_trials
via a request object, either of type
ListOptimalTrialsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_optimal_trials(parent: nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse
list_optimal_trials
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).
- parent (::String) — Required. The name of the Study that the optimal Trial belongs to.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest.new # Call the list_optimal_trials method. result = client.list_optimal_trials request # The returned object is of type Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse. p result
#list_studies
def list_studies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>
def list_studies(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>
Lists all the studies in a region for an associated project.
def list_studies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>
list_studies
via a request object, either of type
ListStudiesRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListStudiesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_studies(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>
list_studies
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).
-
parent (::String) — Required. The resource name of the Location to list the Study from.
Format:
projects/{project}/locations/{location}
- page_token (::String) — Optional. A page token to request the next page of results. If unspecified, there are no subsequent pages.
- page_size (::Integer) — Optional. The maximum number of studies to return per "page" of results. If unspecified, service will pick an appropriate default.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListStudiesRequest.new # Call the list_studies method. result = client.list_studies request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::AIPlatform::V1::Study. p response end
#list_trials
def list_trials(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>
def list_trials(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>
Lists the Trials associated with a Study.
def list_trials(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>
list_trials
via a request object, either of type
ListTrialsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListTrialsRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_trials(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>
list_trials
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).
-
parent (::String) — Required. The resource name of the Study to list the Trial from.
Format:
projects/{project}/locations/{location}/studies/{study}
- page_token (::String) — Optional. A page token to request the next page of results. If unspecified, there are no subsequent pages.
- page_size (::Integer) — Optional. The number of Trials to retrieve per "page" of results. If unspecified, the service will pick an appropriate default.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListTrialsRequest.new # Call the list_trials method. result = client.list_trials request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::AIPlatform::V1::Trial. p response end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#lookup_study
def lookup_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
def lookup_study(parent: nil, display_name: nil) -> ::Google::Cloud::AIPlatform::V1::Study
Looks a study up using the user-defined display_name field instead of the fully qualified resource name.
def lookup_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
lookup_study
via a request object, either of type
LookupStudyRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::LookupStudyRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def lookup_study(parent: nil, display_name: nil) -> ::Google::Cloud::AIPlatform::V1::Study
lookup_study
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).
-
parent (::String) — Required. The resource name of the Location to get the Study from.
Format:
projects/{project}/locations/{location}
- display_name (::String) — Required. The user-defined display name of the Study
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Study)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::LookupStudyRequest.new # Call the lookup_study method. result = client.lookup_study request # The returned object is of type Google::Cloud::AIPlatform::V1::Study. p result
#operations_client
def operations_client() -> ::Google::Cloud::AIPlatform::V1::VizierService::Operations
Get the associated client for long-running operations.
#stop_trial
def stop_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
def stop_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
Stops a Trial.
def stop_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
stop_trial
via a request object, either of type
StopTrialRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::StopTrialRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial
stop_trial
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).
-
name (::String) — Required. The Trial's name.
Format:
projects/{project}/locations/{location}/studies/{study}/trials/{trial}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Trial)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::StopTrialRequest.new # Call the stop_trial method. result = client.stop_trial request # The returned object is of type Google::Cloud::AIPlatform::V1::Trial. p result
#suggest_trials
def suggest_trials(request, options = nil) -> ::Gapic::Operation
def suggest_trials(parent: nil, suggestion_count: nil, client_id: nil) -> ::Gapic::Operation
Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
def suggest_trials(request, options = nil) -> ::Gapic::Operation
suggest_trials
via a request object, either of type
SuggestTrialsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::SuggestTrialsRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def suggest_trials(parent: nil, suggestion_count: nil, client_id: nil) -> ::Gapic::Operation
suggest_trials
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).
-
parent (::String) — Required. The project and location that the Study belongs to.
Format:
projects/{project}/locations/{location}/studies/{study}
- suggestion_count (::Integer) — Required. The number of suggestions requested. It must be positive.
-
client_id (::String) — Required. The identifier of the client that is requesting the suggestion.
If multiple SuggestTrialsRequests have the same
client_id
, the service will return the identical suggested Trial if the Trial is pending, and provide a new Trial if the last suggested Trial was completed.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::VizierService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::SuggestTrialsRequest.new # Call the suggest_trials method. result = client.suggest_trials request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end