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.



758
759
760
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 758

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)


748
749
750
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 748

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)


756
757
758
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 756

def node_id_prefix
  @node_id_prefix
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



763
764
765
766
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 763

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)
end