Skip to content

Commit 4ddee4f

Browse files
Sets min_nodes to 0 multi-host configs
1 parent 83f83c6 commit 4ddee4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

keras_remote/cli/infra/program.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def _create_tpu_node_pool(cluster, tpu: TpuConfig, zone, project_id, pool_name):
246246
# Single-host TPU slices (1 node) must not specify placement_policy;
247247
# multi-host slices require COMPACT placement with an explicit topology.
248248
is_multi_host = tpu.num_nodes > 1
249-
min_nodes = tpu.num_nodes if is_multi_host else 0
249+
# Autoscaling is enabled, so we need to set the min_node_count to 0.
250+
min_nodes = 0
250251

251252
placement = (
252253
gcp.container.NodePoolPlacementPolicyArgs(

0 commit comments

Comments
 (0)