Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

hzhua
Copy link
Contributor

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants