Class: Google::Apis::TpuV2alpha1::MultiNodeParams
- Inherits:
-
Object
- Object
- Google::Apis::TpuV2alpha1::MultiNodeParams
- 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
-
#node_count ⇒ Fixnum
Required.
-
#node_id_prefix ⇒ String
Prefix of node_ids in case of multi-node request Should follow the
^[A-Za-z0- 9_.~+%-]+$regex format. -
#workload_type ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MultiNodeParams
constructor
A new instance of MultiNodeParams.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_count ⇒ Fixnum
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
820 821 822 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 820 def node_count @node_count end |
#node_id_prefix ⇒ String
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
828 829 830 |
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 828 def node_id_prefix @node_id_prefix end |
#workload_type ⇒ String
Optional. The workload type for the multi-node request.
Corresponds to the JSON property workloadType
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 |