Class: Google::Apis::TpuV2::SchedulingConfig
- Inherits:
-
Object
- Object
- Google::Apis::TpuV2::SchedulingConfig
- 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
Sets the scheduling options for this node.
Instance Attribute Summary collapse
-
#preemptible ⇒ Boolean
(also: #preemptible?)
Defines whether the node is preemptible.
-
#reserved ⇒ Boolean
(also: #reserved?)
Whether the node is created under a reservation.
-
#spot ⇒ Boolean
(also: #spot?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SchedulingConfig
constructor
A new instance of SchedulingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SchedulingConfig
Returns a new instance of SchedulingConfig.
1346 1347 1348 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1346 def initialize(**args) update!(**args) end |
Instance Attribute Details
#preemptible ⇒ Boolean Also known as: preemptible?
Defines whether the node is preemptible.
Corresponds to the JSON property preemptible
1331 1332 1333 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1331 def preemptible @preemptible end |
#reserved ⇒ Boolean Also known as: reserved?
Whether the node is created under a reservation.
Corresponds to the JSON property reserved
1337 1338 1339 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1337 def reserved @reserved end |
#spot ⇒ Boolean Also known as: spot?
Optional. Defines whether the node is Spot VM.
Corresponds to the JSON property spot
1343 1344 1345 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1343 def spot @spot end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1351 1352 1353 1354 1355 |
# File 'lib/google/apis/tpu_v2/classes.rb', line 1351 def update!(**args) @preemptible = args[:preemptible] if args.key?(:preemptible) @reserved = args[:reserved] if args.key?(:reserved) @spot = args[:spot] if args.key?(:spot) end |