Class: Google::Apis::TpuV2alpha1::MultiNodeParams

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/tpu_v2alpha1/classes.rb,
lib/google/apis/tpu_v2alpha1/representations.rb,
lib/google/apis/tpu_v2alpha1/representations.rb

Overview

Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It's an error to specify both node_id and multi_node_params.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MultiNodeParams

Returns a new instance of MultiNodeParams.



835
836
837
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 835

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#node_countFixnum

Required. Number of nodes with this spec. The system will attempt to provison " node_count" nodes as part of the request. This needs to be > 1. Corresponds to the JSON property nodeCount

Returns:

  • (Fixnum)


820
821
822
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 820

def node_count
  @node_count
end

#node_id_prefixString

Prefix of node_ids in case of multi-node request Should follow the ^[A-Za-z0- 9_.~+%-]+$ regex format. If node_count = 3 and node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1", "np-2". If this field is not provided we use queued_resource_id as the node_id_prefix. Corresponds to the JSON property nodeIdPrefix

Returns:

  • (String)


828
829
830
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 828

def node_id_prefix
  @node_id_prefix
end

#workload_typeString

Optional. The workload type for the multi-node request. Corresponds to the JSON property workloadType

Returns:

  • (String)


833
834
835
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 833

def workload_type
  @workload_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



840
841
842
843
844
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 840

def update!(**args)
  @node_count = args[:node_count] if args.key?(:node_count)
  @node_id_prefix = args[:node_id_prefix] if args.key?(:node_id_prefix)
  @workload_type = args[:workload_type] if args.key?(:workload_type)
end