Class: Google::Apis::TpuV2::MultisliceParams

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

Overview

Parameters to specify for multislice QueuedResource requests. This message must be populated in case of multislice requests instead of node_id.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MultisliceParams

Returns a new instance of MultisliceParams.



714
715
716
# File 'lib/google/apis/tpu_v2/classes.rb', line 714

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

Instance Attribute Details

#node_countFixnum

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

Returns:

  • (Fixnum)


704
705
706
# File 'lib/google/apis/tpu_v2/classes.rb', line 704

def node_count
  @node_count
end

#node_id_prefixString

Optional. Prefix of node_ids in case of multislice 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)


712
713
714
# File 'lib/google/apis/tpu_v2/classes.rb', line 712

def node_id_prefix
  @node_id_prefix
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



719
720
721
722
# File 'lib/google/apis/tpu_v2/classes.rb', line 719

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