Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTO-BACKPORT 10160] fix: maxPoolSlotCapacity bug #10195

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion webui/react/src/components/HyperparameterSearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,18 @@ const HyperparameterSearchModal = ({ closeModal, experiment, trial }: Props): JS
);

const maxSlots = useMemo(
() => (resourcePool ? maxPoolSlotCapacity(resourcePool) : 0),
/**
* On-premise deployments don't have dynamic agents and we don't know how many
* agents might connect.
*
* This is a work around for dynamic agents such as Kubernetes where `slotsAvailable`,
* `slotsPerAgents` and `maxAgents` are all zero. This value is used for form
* validation and it is too strict to allow anything to run experiments. Intentially
* generalized and not matching against Kubernetes, in case other schedulers return
* zeroes, and this would at least unblock experiments, and the backend would be able
* to return capacity issues.
*/
() => (resourcePool ? maxPoolSlotCapacity(resourcePool) || Infinity : 0),
[resourcePool],
);

Expand Down
13 changes: 1 addition & 12 deletions webui/react/src/stores/cluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,7 @@ export const maxPoolSlotCapacity = (pool: ResourcePool): number => {
if (pool.maxAgents > 0 && pool.slotsPerAgent && pool.slotsPerAgent > 0) {
return pool.maxAgents * pool.slotsPerAgent;
}
/**
* On-premise deployments don't have dynamic agents and we don't know how many
* agents might connect.
*
* This is a work around for dynamic agents such as Kubernetes where `slotsAvailable`,
* `slotsPerAgents` and `maxAgents` are all zero. This value is used for form
* validation and it is too strict to allow anything to run experiments. Intentially
* generalized and not matching against Kubernetes, in case other schedulers return
* zeroes, and this would at least unblock experiments, and the backend would be able
* to return capacity issues.
*/
return pool.slotsAvailable || Infinity;
return pool.slotsAvailable;
};

/**
Expand Down
Loading