Class: Google::Cloud::AIPlatform::V1::TensorboardService::Client

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

Overview

Client for the TensorboardService service.

TensorboardService

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#location_path, #tensorboard_experiment_path, #tensorboard_path, #tensorboard_run_path, #tensorboard_time_series_path

Constructor Details

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

Create a new TensorboardService client object.

Examples:


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

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

Yields:

  • (config)

    Configure the TensorboardService client.

Yield Parameters:



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 111

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/tensorboard_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 == 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
  end

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

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

  @tensorboard_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::AIPlatform::V1::TensorboardService::Stub,
    credentials:  credentials,
    endpoint:     @config.endpoint,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool
  )
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)


185
186
187
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 185

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)


178
179
180
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 178

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



171
172
173
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 171

def operations_client
  @operations_client
end

Class Method Details

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

Configure the TensorboardService Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 58

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

#batch_create_tensorboard_runs(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardRunsResponse #batch_create_tensorboard_runs(parent: nil, requests: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardRunsResponse

Batch create TensorboardRuns.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #batch_create_tensorboard_runs(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardRunsResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardRunsRequest, ::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.

  • #batch_create_tensorboard_runs(parent: nil, requests: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardRunsResponse

    Pass arguments to batch_create_tensorboard_runs 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 TensorboardExperiment to create the TensorboardRuns in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The parent field in the CreateTensorboardRunRequest messages must match this field.

    • requests (::Array<::Google::Cloud::AIPlatform::V1::CreateTensorboardRunRequest, ::Hash>) (defaults to: nil)

      Required. The request message specifying the TensorboardRuns to create. A maximum of 1000 TensorboardRuns can be created in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1482

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

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

  # 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.batch_create_tensorboard_runs..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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.batch_create_tensorboard_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_create_tensorboard_runs.retry_policy

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

  @tensorboard_service_stub.call_rpc :batch_create_tensorboard_runs, 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

#batch_create_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardTimeSeriesResponse #batch_create_tensorboard_time_series(parent: nil, requests: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardTimeSeriesResponse

Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #batch_create_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardTimeSeriesResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardTimeSeriesRequest, ::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.

  • #batch_create_tensorboard_time_series(parent: nil, requests: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchCreateTensorboardTimeSeriesResponse

    Pass arguments to batch_create_tensorboard_time_series 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 TensorboardExperiment to create the TensorboardTimeSeries in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment} The TensorboardRuns referenced by the parent fields in the CreateTensorboardTimeSeriesRequest messages must be sub resources of this TensorboardExperiment.

    • requests (::Array<::Google::Cloud::AIPlatform::V1::CreateTensorboardTimeSeriesRequest, ::Hash>) (defaults to: nil)

      Required. The request message specifying the TensorboardTimeSeries to create. A maximum of 1000 TensorboardTimeSeries can be created in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1995
1996
1997
1998
1999
2000
2001
2002
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1963

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

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

  # 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.batch_create_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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.batch_create_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_create_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :batch_create_tensorboard_time_series, 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

#batch_read_tensorboard_time_series_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchReadTensorboardTimeSeriesDataResponse #batch_read_tensorboard_time_series_data(tensorboard: nil, time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchReadTensorboardTimeSeriesDataResponse

Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #batch_read_tensorboard_time_series_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchReadTensorboardTimeSeriesDataResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::BatchReadTensorboardTimeSeriesDataRequest, ::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.

  • #batch_read_tensorboard_time_series_data(tensorboard: nil, time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchReadTensorboardTimeSeriesDataResponse

    Pass arguments to batch_read_tensorboard_time_series_data 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:

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

      Required. The resource name of the Tensorboard containing TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}. The TensorboardTimeSeries referenced by time_series must be sub resources of this Tensorboard.

    • time_series (::Array<::String>) (defaults to: nil)

      Required. The resource names of the TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2544

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

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

  # 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.batch_read_tensorboard_time_series_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard
    header_params["tensorboard"] = request.tensorboard
  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.batch_read_tensorboard_time_series_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_read_tensorboard_time_series_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :batch_read_tensorboard_time_series_data, 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 TensorboardService 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:



90
91
92
93
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 90

def configure
  yield @config if block_given?
  @config
end

#create_tensorboard(request, options = nil) ⇒ ::Gapic::Operation #create_tensorboard(parent: nil, tensorboard: nil) ⇒ ::Gapic::Operation

Creates a Tensorboard.

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::TensorboardService::Client.new

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

# Call the create_tensorboard method.
result = client.create_tensorboard 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:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateTensorboardRequest, ::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_tensorboard(parent: nil, tensorboard: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_tensorboard 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 Tensorboard in. Format: projects/{project}/locations/{location}

    • tensorboard (::Google::Cloud::AIPlatform::V1::Tensorboard, ::Hash) (defaults to: nil)

      Required. The Tensorboard to create.

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.



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 243

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

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

  # 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_tensorboard..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tensorboard.retry_policy

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

  @tensorboard_service_stub.call_rpc :create_tensorboard, 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

#create_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment #create_tensorboard_experiment(parent: nil, tensorboard_experiment: nil, tensorboard_experiment_id: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

Creates a TensorboardExperiment.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #create_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateTensorboardExperimentRequest, ::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_tensorboard_experiment(parent: nil, tensorboard_experiment: nil, tensorboard_experiment_id: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

    Pass arguments to create_tensorboard_experiment 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 Tensorboard to create the TensorboardExperiment in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

    • tensorboard_experiment (::Google::Cloud::AIPlatform::V1::TensorboardExperiment, ::Hash) (defaults to: nil)

      The TensorboardExperiment to create.

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

      Required. The ID to use for the Tensorboard experiment, which becomes the final component of the Tensorboard experiment's resource name.

      This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 908

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

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

  # 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_tensorboard_experiment..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_experiment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tensorboard_experiment.retry_policy

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

  @tensorboard_service_stub.call_rpc :create_tensorboard_experiment, 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_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun #create_tensorboard_run(parent: nil, tensorboard_run: nil, tensorboard_run_id: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

Creates a TensorboardRun.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #create_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateTensorboardRunRequest, ::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_tensorboard_run(parent: nil, tensorboard_run: nil, tensorboard_run_id: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

    Pass arguments to create_tensorboard_run 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 TensorboardExperiment to create the TensorboardRun in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

    • tensorboard_run (::Google::Cloud::AIPlatform::V1::TensorboardRun, ::Hash) (defaults to: nil)

      Required. The TensorboardRun to create.

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

      Required. The ID to use for the Tensorboard run, which becomes the final component of the Tensorboard run's resource name.

      This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1390

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

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

  # 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_tensorboard_run..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tensorboard_run.retry_policy

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

  @tensorboard_service_stub.call_rpc :create_tensorboard_run, 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_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries #create_tensorboard_time_series(parent: nil, tensorboard_time_series_id: nil, tensorboard_time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

Creates a TensorboardTimeSeries.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #create_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateTensorboardTimeSeriesRequest, ::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_tensorboard_time_series(parent: nil, tensorboard_time_series_id: nil, tensorboard_time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

    Pass arguments to create_tensorboard_time_series 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 TensorboardRun to create the TensorboardTimeSeries in. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

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

      Optional. The user specified unique ID to use for the TensorboardTimeSeries, which becomes the final component of the TensorboardTimeSeries's resource name. This value should match "[a-z0-9][a-z0-9-]{0, 127}"

    • tensorboard_time_series (::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries, ::Hash) (defaults to: nil)

      Required. The TensorboardTimeSeries 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.



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
2091
2092
2093
2094
2095
2096
2097
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2058

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

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

  # 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_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :create_tensorboard_time_series, 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_tensorboard(request, options = nil) ⇒ ::Gapic::Operation #delete_tensorboard(name: nil) ⇒ ::Gapic::Operation

Deletes a Tensorboard.

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::TensorboardService::Client.new

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

# Call the delete_tensorboard method.
result = client.delete_tensorboard 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_tensorboard(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteTensorboardRequest, ::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_tensorboard(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tensorboard 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 Tensorboard to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

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.



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 638

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

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

  # 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_tensorboard..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tensorboard.retry_policy

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

  @tensorboard_service_stub.call_rpc :delete_tensorboard, 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_tensorboard_experiment(request, options = nil) ⇒ ::Gapic::Operation #delete_tensorboard_experiment(name: nil) ⇒ ::Gapic::Operation

Deletes a TensorboardExperiment.

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::TensorboardService::Client.new

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

# Call the delete_tensorboard_experiment method.
result = client.delete_tensorboard_experiment 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_tensorboard_experiment(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteTensorboardExperimentRequest, ::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_tensorboard_experiment(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tensorboard_experiment 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 TensorboardExperiment to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

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.



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1294

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

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

  # 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_tensorboard_experiment..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_experiment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tensorboard_experiment.retry_policy

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

  @tensorboard_service_stub.call_rpc :delete_tensorboard_experiment, 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_tensorboard_run(request, options = nil) ⇒ ::Gapic::Operation #delete_tensorboard_run(name: nil) ⇒ ::Gapic::Operation

Deletes a TensorboardRun.

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::TensorboardService::Client.new

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

# Call the delete_tensorboard_run method.
result = client.delete_tensorboard_run 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_tensorboard_run(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteTensorboardRunRequest, ::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_tensorboard_run(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tensorboard_run 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 TensorboardRun to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

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.



1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1868

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

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

  # 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_tensorboard_run..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tensorboard_run.retry_policy

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

  @tensorboard_service_stub.call_rpc :delete_tensorboard_run, 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_tensorboard_time_series(request, options = nil) ⇒ ::Gapic::Operation #delete_tensorboard_time_series(name: nil) ⇒ ::Gapic::Operation

Deletes a TensorboardTimeSeries.

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::TensorboardService::Client.new

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

# Call the delete_tensorboard_time_series method.
result = client.delete_tensorboard_time_series 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_tensorboard_time_series(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteTensorboardTimeSeriesRequest, ::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_tensorboard_time_series(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tensorboard_time_series 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 TensorboardTimeSeries to be deleted. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

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.



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
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2445

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

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

  # 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_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :delete_tensorboard_time_series, 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

#export_tensorboard_time_series_data(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TimeSeriesDataPoint> #export_tensorboard_time_series_data(tensorboard_time_series: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TimeSeriesDataPoint>

Exports a TensorboardTimeSeries' data. Data is returned in paginated responses.

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::TensorboardService::Client.new

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

# Call the export_tensorboard_time_series_data method.
result = client.export_tensorboard_time_series_data 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::TimeSeriesDataPoint.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ExportTensorboardTimeSeriesDataRequest, ::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.

  • #export_tensorboard_time_series_data(tensorboard_time_series: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TimeSeriesDataPoint>

    Pass arguments to export_tensorboard_time_series_data 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:

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

      Required. The resource name of the TensorboardTimeSeries to export data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

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

      Exports the TensorboardTimeSeries' data that match the filter expression.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of data points to return per page. The default page_size is 1000. Values must be between 1 and 10000. Values above 10000 are coerced to 10000.

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

      A page token, received from a previous ExportTensorboardTimeSeriesData call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ExportTensorboardTimeSeriesData must match the call that provided the page token.

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

      Field to use to sort the TensorboardTimeSeries' data. By default, TensorboardTimeSeries' data is returned in a pseudo random order.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 3031

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

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

  # 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.export_tensorboard_time_series_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_time_series
    header_params["tensorboard_time_series"] = request.tensorboard_time_series
  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.export_tensorboard_time_series_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_tensorboard_time_series_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :export_tensorboard_time_series_data, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :export_tensorboard_time_series_data, 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

#get_tensorboard(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::Tensorboard #get_tensorboard(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::Tensorboard

Gets a Tensorboard.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #get_tensorboard(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::Tensorboard

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetTensorboardRequest, ::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_tensorboard(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::Tensorboard

    Pass arguments to get_tensorboard 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 Tensorboard resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 331

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

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

  # 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_tensorboard..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tensorboard.retry_policy

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

  @tensorboard_service_stub.call_rpc :get_tensorboard, 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_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment #get_tensorboard_experiment(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

Gets a TensorboardExperiment.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #get_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetTensorboardExperimentRequest, ::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_tensorboard_experiment(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

    Pass arguments to get_tensorboard_experiment 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 TensorboardExperiment resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 995

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

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

  # 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_tensorboard_experiment..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_experiment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tensorboard_experiment.retry_policy

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

  @tensorboard_service_stub.call_rpc :get_tensorboard_experiment, 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_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun #get_tensorboard_run(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

Gets a TensorboardRun.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #get_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetTensorboardRunRequest, ::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_tensorboard_run(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

    Pass arguments to get_tensorboard_run 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 TensorboardRun resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1569

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

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

  # 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_tensorboard_run..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tensorboard_run.retry_policy

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

  @tensorboard_service_stub.call_rpc :get_tensorboard_run, 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_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries #get_tensorboard_time_series(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

Gets a TensorboardTimeSeries.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #get_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetTensorboardTimeSeriesRequest, ::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_tensorboard_time_series(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

    Pass arguments to get_tensorboard_time_series 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 TensorboardTimeSeries resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2145
2146
2147
2148
2149
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2145

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

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

  # 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_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :get_tensorboard_time_series, 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_tensorboard_experiments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardExperiment> #list_tensorboard_experiments(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardExperiment>

Lists TensorboardExperiments 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::TensorboardService::Client.new

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

# Call the list_tensorboard_experiments method.
result = client.list_tensorboard_experiments 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::TensorboardExperiment.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListTensorboardExperimentsRequest, ::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_tensorboard_experiments(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardExperiment>

    Pass arguments to list_tensorboard_experiments 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 Tensorboard to list TensorboardExperiments. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

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

      Lists the TensorboardExperiments that match the filter expression.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of TensorboardExperiments to return. The service may return fewer than this value. If unspecified, at most 50 TensorboardExperiments are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

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

      A page token, received from a previous TensorboardService.ListTensorboardExperiments call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to TensorboardService.ListTensorboardExperiments must match the call that provided the page token.

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

      Field to use to sort the list.

    • 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.



1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1199

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

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

  # 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_tensorboard_experiments..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_experiments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tensorboard_experiments.retry_policy

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

  @tensorboard_service_stub.call_rpc :list_tensorboard_experiments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_experiments, 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_tensorboard_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardRun> #list_tensorboard_runs(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardRun>

Lists TensorboardRuns 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::TensorboardService::Client.new

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

# Call the list_tensorboard_runs method.
result = client.list_tensorboard_runs 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::TensorboardRun.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListTensorboardRunsRequest, ::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_tensorboard_runs(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardRun>

    Pass arguments to list_tensorboard_runs 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 TensorboardExperiment to list TensorboardRuns. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

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

      Lists the TensorboardRuns that match the filter expression.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of TensorboardRuns to return. The service may return fewer than this value. If unspecified, at most 50 TensorboardRuns are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

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

      A page token, received from a previous TensorboardService.ListTensorboardRuns call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to TensorboardService.ListTensorboardRuns must match the call that provided the page token.

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

      Field to use to sort the list.

    • 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.



1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1773

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

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

  # 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_tensorboard_runs..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tensorboard_runs.retry_policy

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

  @tensorboard_service_stub.call_rpc :list_tensorboard_runs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_runs, 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_tensorboard_time_series(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries> #list_tensorboard_time_series(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries>

Lists TensorboardTimeSeries 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::TensorboardService::Client.new

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

# Call the list_tensorboard_time_series method.
result = client.list_tensorboard_time_series 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::TensorboardTimeSeries.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListTensorboardTimeSeriesRequest, ::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_tensorboard_time_series(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries>

    Pass arguments to list_tensorboard_time_series 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 TensorboardRun to list TensorboardTimeSeries. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

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

      Lists the TensorboardTimeSeries that match the filter expression.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of TensorboardTimeSeries to return. The service may return fewer than this value. If unspecified, at most 50 TensorboardTimeSeries are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

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

      A page token, received from a previous TensorboardService.ListTensorboardTimeSeries call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to TensorboardService.ListTensorboardTimeSeries must match the call that provided the page token.

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

      Field to use to sort the list.

    • 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.



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
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2350

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

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

  # 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_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :list_tensorboard_time_series, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_time_series, 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_tensorboards(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Tensorboard> #list_tensorboards(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Tensorboard>

Lists Tensorboards 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::TensorboardService::Client.new

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

# Call the list_tensorboards method.
result = client.list_tensorboards 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::Tensorboard.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListTensorboardsRequest, ::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_tensorboards(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Tensorboard>

    Pass arguments to list_tensorboards 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 Tensorboards. Format: projects/{project}/locations/{location}

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

      Lists the Tensorboards that match the filter expression.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of Tensorboards to return. The service may return fewer than this value. If unspecified, at most 100 Tensorboards are returned. The maximum value is 100; values above 100 are coerced to 100.

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

      A page token, received from a previous TensorboardService.ListTensorboards call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to TensorboardService.ListTensorboards must match the call that provided the page token.

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

      Field to use to sort the list.

    • 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.



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 543

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

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

  # 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_tensorboards..to_h

  # Set x-goog-api-client and x-goog-user-project 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-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_tensorboards.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tensorboards.retry_policy

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

  @tensorboard_service_stub.call_rpc :list_tensorboards, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboards, 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

#read_tensorboard_blob_data(request, options = nil) ⇒ ::Enumerable<::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataResponse> #read_tensorboard_blob_data(time_series: nil, blob_ids: nil) ⇒ ::Enumerable<::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataResponse>

Gets bytes of TensorboardBlobs. This is to allow reading blob data stored in consumer project's Cloud Storage bucket without users having to obtain Cloud Storage access permission.

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::TensorboardService::Client.new

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

# Call the read_tensorboard_blob_data method to start streaming.
output = client.read_tensorboard_blob_data request

# The returned object is a streamed enumerable yielding elements of type
# ::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataResponse
output.each do |current_response|
  p current_response
end

Overloads:

  • #read_tensorboard_blob_data(request, options = nil) ⇒ ::Enumerable<::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataResponse>

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataRequest, ::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.

  • #read_tensorboard_blob_data(time_series: nil, blob_ids: nil) ⇒ ::Enumerable<::Google::Cloud::AIPlatform::V1::ReadTensorboardBlobDataResponse>

    Pass arguments to read_tensorboard_blob_data 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:

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

      Required. The resource name of the TensorboardTimeSeries to list Blobs. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

    • blob_ids (::Array<::String>) (defaults to: nil)

      IDs of the blobs 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.



2737
2738
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2737

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

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

  # 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.read_tensorboard_blob_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.time_series
    header_params["time_series"] = request.time_series
  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.read_tensorboard_blob_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.read_tensorboard_blob_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :read_tensorboard_blob_data, 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

#read_tensorboard_size(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardSizeResponse #read_tensorboard_size(tensorboard: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardSizeResponse

Returns the storage size for a given TensorBoard instance.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #read_tensorboard_size(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardSizeResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ReadTensorboardSizeRequest, ::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.

  • #read_tensorboard_size(tensorboard: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardSizeResponse

    Pass arguments to read_tensorboard_size 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:

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

      Required. The name of the Tensorboard resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 813

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

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

  # 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.read_tensorboard_size..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard
    header_params["tensorboard"] = request.tensorboard
  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.read_tensorboard_size.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.read_tensorboard_size.retry_policy

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

  @tensorboard_service_stub.call_rpc :read_tensorboard_size, 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

#read_tensorboard_time_series_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardTimeSeriesDataResponse #read_tensorboard_time_series_data(tensorboard_time_series: nil, max_data_points: nil, filter: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardTimeSeriesDataResponse

Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data is returned. Otherwise, 1000 data points is randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can't be greater than 10k.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #read_tensorboard_time_series_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardTimeSeriesDataResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ReadTensorboardTimeSeriesDataRequest, ::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.

  • #read_tensorboard_time_series_data(tensorboard_time_series: nil, max_data_points: nil, filter: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardTimeSeriesDataResponse

    Pass arguments to read_tensorboard_time_series_data 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:

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

      Required. The resource name of the TensorboardTimeSeries to read data from. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

    • max_data_points (::Integer) (defaults to: nil)

      The maximum number of TensorboardTimeSeries' data to return.

      This value should be a positive integer. This value can be set to -1 to return all data.

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

      Reads the TensorboardTimeSeries' data that match the filter expression.

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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2642

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

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

  # 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.read_tensorboard_time_series_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_time_series
    header_params["tensorboard_time_series"] = request.tensorboard_time_series
  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.read_tensorboard_time_series_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.read_tensorboard_time_series_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :read_tensorboard_time_series_data, 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

#read_tensorboard_usage(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardUsageResponse #read_tensorboard_usage(tensorboard: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardUsageResponse

Returns a list of monthly active users for a given TensorBoard instance.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #read_tensorboard_usage(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardUsageResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ReadTensorboardUsageRequest, ::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.

  • #read_tensorboard_usage(tensorboard: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ReadTensorboardUsageResponse

    Pass arguments to read_tensorboard_usage 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:

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

      Required. The name of the Tensorboard resource. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 726

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

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

  # 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.read_tensorboard_usage..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard
    header_params["tensorboard"] = request.tensorboard
  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.read_tensorboard_usage.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.read_tensorboard_usage.retry_policy

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

  @tensorboard_service_stub.call_rpc :read_tensorboard_usage, 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

#update_tensorboard(request, options = nil) ⇒ ::Gapic::Operation #update_tensorboard(update_mask: nil, tensorboard: nil) ⇒ ::Gapic::Operation

Updates a Tensorboard.

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::TensorboardService::Client.new

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

# Call the update_tensorboard method.
result = client.update_tensorboard 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_tensorboard(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::UpdateTensorboardRequest, ::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_tensorboard(update_mask: nil, tensorboard: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_tensorboard 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:

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

      Required. Field mask is used to specify the fields to be overwritten in the Tensorboard resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it's in the mask. If the user does not provide a mask then all fields are overwritten if new values are specified.

    • tensorboard (::Google::Cloud::AIPlatform::V1::Tensorboard, ::Hash) (defaults to: nil)

      Required. The Tensorboard's name field is used to identify the Tensorboard to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

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.



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 432

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

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

  # 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_tensorboard..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard&.name
    header_params["tensorboard.name"] = request.tensorboard.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_tensorboard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tensorboard.retry_policy

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

  @tensorboard_service_stub.call_rpc :update_tensorboard, 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

#update_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment #update_tensorboard_experiment(update_mask: nil, tensorboard_experiment: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

Updates a TensorboardExperiment.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #update_tensorboard_experiment(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::UpdateTensorboardExperimentRequest, ::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_tensorboard_experiment(update_mask: nil, tensorboard_experiment: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardExperiment

    Pass arguments to update_tensorboard_experiment 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:

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

      Required. Field mask is used to specify the fields to be overwritten in the TensorboardExperiment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it's in the mask. If the user does not provide a mask then all fields are overwritten if new values are specified.

    • tensorboard_experiment (::Google::Cloud::AIPlatform::V1::TensorboardExperiment, ::Hash) (defaults to: nil)

      Required. The TensorboardExperiment's name field is used to identify the TensorboardExperiment to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1089

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

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

  # 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_tensorboard_experiment..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_experiment&.name
    header_params["tensorboard_experiment.name"] = request.tensorboard_experiment.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_tensorboard_experiment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tensorboard_experiment.retry_policy

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

  @tensorboard_service_stub.call_rpc :update_tensorboard_experiment, 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

#update_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun #update_tensorboard_run(update_mask: nil, tensorboard_run: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

Updates a TensorboardRun.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #update_tensorboard_run(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::UpdateTensorboardRunRequest, ::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_tensorboard_run(update_mask: nil, tensorboard_run: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardRun

    Pass arguments to update_tensorboard_run 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:

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

      Required. Field mask is used to specify the fields to be overwritten in the TensorboardRun resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it's in the mask. If the user does not provide a mask then all fields are overwritten if new values are specified.

    • tensorboard_run (::Google::Cloud::AIPlatform::V1::TensorboardRun, ::Hash) (defaults to: nil)

      Required. The TensorboardRun's name field is used to identify the TensorboardRun to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1694
1695
1696
1697
1698
1699
1700
1701
1702
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 1663

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

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

  # 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_tensorboard_run..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_run&.name
    header_params["tensorboard_run.name"] = request.tensorboard_run.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_tensorboard_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tensorboard_run.retry_policy

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

  @tensorboard_service_stub.call_rpc :update_tensorboard_run, 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

#update_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries #update_tensorboard_time_series(update_mask: nil, tensorboard_time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

Updates a TensorboardTimeSeries.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #update_tensorboard_time_series(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::UpdateTensorboardTimeSeriesRequest, ::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_tensorboard_time_series(update_mask: nil, tensorboard_time_series: nil) ⇒ ::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries

    Pass arguments to update_tensorboard_time_series 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:

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

      Required. Field mask is used to specify the fields to be overwritten in the TensorboardTimeSeries resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it's in the mask. If the user does not provide a mask then all fields are overwritten if new values are specified.

    • tensorboard_time_series (::Google::Cloud::AIPlatform::V1::TensorboardTimeSeries, ::Hash) (defaults to: nil)

      Required. The TensorboardTimeSeries' name field is used to identify the TensorboardTimeSeries to be updated. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
2279
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2240

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

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

  # 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_tensorboard_time_series..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_time_series&.name
    header_params["tensorboard_time_series.name"] = request.tensorboard_time_series.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_tensorboard_time_series.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tensorboard_time_series.retry_policy

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

  @tensorboard_service_stub.call_rpc :update_tensorboard_time_series, 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

#write_tensorboard_experiment_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardExperimentDataResponse #write_tensorboard_experiment_data(tensorboard_experiment: nil, write_run_data_requests: nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardExperimentDataResponse

Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's. If any data fail to be ingested, an error is returned.

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::TensorboardService::Client.new

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::WriteTensorboardExperimentDataResponse.
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.



2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2827

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

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

  # 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.write_tensorboard_experiment_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_experiment
    header_params["tensorboard_experiment"] = request.tensorboard_experiment
  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.write_tensorboard_experiment_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.write_tensorboard_experiment_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :write_tensorboard_experiment_data, 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

#write_tensorboard_run_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardRunDataResponse #write_tensorboard_run_data(tensorboard_run: nil, time_series_data: nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardRunDataResponse

Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error is returned.

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::TensorboardService::Client.new

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

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

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

Overloads:

  • #write_tensorboard_run_data(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardRunDataResponse

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

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::WriteTensorboardRunDataRequest, ::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.

  • #write_tensorboard_run_data(tensorboard_run: nil, time_series_data: nil) ⇒ ::Google::Cloud::AIPlatform::V1::WriteTensorboardRunDataResponse

    Pass arguments to write_tensorboard_run_data 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:

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

      Required. The resource name of the TensorboardRun to write data to. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

    • time_series_data (::Array<::Google::Cloud::AIPlatform::V1::TimeSeriesData, ::Hash>) (defaults to: nil)

      Required. The TensorboardTimeSeries data to write. Values with in a time series are indexed by their step value. Repeated writes to the same step will overwrite the existing value for that step. The upper limit of data points per write request is 5000.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2921
2922
2923
2924
2925
2926
2927
2928
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
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb', line 2921

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

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

  # 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.write_tensorboard_run_data..to_h

  # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.tensorboard_run
    header_params["tensorboard_run"] = request.tensorboard_run
  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.write_tensorboard_run_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.write_tensorboard_run_data.retry_policy

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

  @tensorboard_service_stub.call_rpc :write_tensorboard_run_data, 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