Enforce min_nodes >= 2 for RDMA (MlxJaccl) instances
RDMA requires at least 2 nodes — a single-node RDMA instance is nonsensical. Enforce this in both the dashboard (when building the launch request) and the backend placement (when filtering cycles). Previously, selecting RDMA would still place on 1 node because min_nodes defaulted to 1 and the placement silently switched to Ring. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
25e2891c30
commit
4aecaa7748
@@ -643,7 +643,12 @@
|
||||
model_id: modelId,
|
||||
sharding: preview?.sharding ?? selectedSharding,
|
||||
instance_meta: preview?.instance_meta ?? selectedInstanceType,
|
||||
min_nodes: Math.max(selectedMinNodes, nodeFilter.size),
|
||||
min_nodes: Math.max(
|
||||
selectedMinNodes,
|
||||
nodeFilter.size,
|
||||
// RDMA requires at least 2 nodes
|
||||
(preview?.instance_meta ?? selectedInstanceType) === "MlxJaccl" ? 2 : 1,
|
||||
),
|
||||
node_ids: nodeFilter.size > 0 ? Array.from(nodeFilter) : undefined,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -63,7 +63,14 @@ def place_instance(
|
||||
required_nodes: set[NodeId] | None = None,
|
||||
) -> dict[InstanceId, Instance]:
|
||||
cycles = topology.get_cycles()
|
||||
candidate_cycles = list(filter(lambda it: len(it) >= command.min_nodes, cycles))
|
||||
# RDMA (MlxJaccl) requires at least 2 nodes
|
||||
effective_min_nodes = max(
|
||||
command.min_nodes,
|
||||
2 if command.instance_meta == InstanceMeta.MlxJaccl else 1,
|
||||
)
|
||||
candidate_cycles = list(
|
||||
filter(lambda it: len(it) >= effective_min_nodes, cycles)
|
||||
)
|
||||
|
||||
# Filter to cycles containing all required nodes (subset matching)
|
||||
if required_nodes:
|
||||
|
||||
Reference in New Issue
Block a user