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

Fix bug: GPUs are not released in Reusable Training Service #3941

Merged
merged 1 commit into from Jul 16, 2021

Conversation

hzhua
Copy link
Member

@hzhua hzhua commented Jul 15, 2021

Because trial.environment is first released, it is always undefined.

private releaseEnvironment(trial: TrialDetail): void {
if (trial.environment !== undefined) {
if (trial.environment.runningTrialCount <= 0) {
throw new Error(`TrialDispatcher: environment ${trial.environment.id} has no counted running trial!`);
}
trial.environment.runningTrialCount--;
trial.environment.latestTrialReleasedTime = Date.now();
trial.environment = undefined;
}
if (true === this.enableGpuScheduler) {
this.gpuScheduler.removeGpuReservation(trial);
}
}

The gpuScheduler will never release it because it requires trial.environment !== undefined

public removeGpuReservation(trial: TrialDetail): void {
if (trial.environment !== undefined &&
trial.environment.defaultGpuSummary !== undefined &&
trial.assignedGpus !== undefined &&
trial.assignedGpus.length > 0) {

To fix this bug, this.gpuScheduler.removeGpuReservation(trial) should be executed at the beginning of releaseEnvironment

@hzhua hzhua changed the title GPUs are not released in Reusable Training Service Fix bug: GPUs are not released in Reusable Training Service Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants