backend.ai-webui icon indicating copy to clipboard operation
backend.ai-webui copied to clipboard

Bugfix: set max values of session slider based on `keypair_limits` and `hideAgents` setting when `alwaysEnqueueComputeSession` is true

Open agatha197 opened this issue 2 years ago • 6 comments

fixes https://github.com/lablup/giftbox/issues/195

this.total_slot is calculated by considering both keypair_resource_limit(keypair_limits) and total_resource_group_slot as shown below. Use this value to calculate the slider maximum when enqueue session is possible.

🚨 FYI,this.total_slot value will vary if other users within the same Resource Group create sessions.

if (keypair_resource_limit['cpu'] === 'Infinity') { // When resource is infinity, use scaling group limit instead.
  total_slot['cpu'] = total_resource_group_slot['cpu'];
} else {
  total_slot['cpu'] = keypair_resource_limit['cpu'];
}

+) fix: avoid getting property from undefined.

agatha197 avatar Feb 24 '23 09:02 agatha197

For me, this is not working. I confirmed that the hideAgent and alwaysEnqueueComputeSession are set to true. image

I have three resource presets: image

I set the user's resource policy to 4 cores, 8 GB memory, and 0.5 fGPU. image

So, at least the resource preset GPU-Suppor should appear in the list. But, nothing is displayed in the user's session launcher. Also, GPU slider is disabled.

image

When I change the resource policy of the user with unlimited values: image

I see two resource presets (I don't know why GPU-Full is not displayed): image

@adrysn Did you set the image doesn't require GPU resource such as Python 3.9? If you did, then GPU resource slider would be disabled. If not, I need to dig down little more.

lizable avatar Feb 26 '23 03:02 lizable

I used ngc-pytorch:22.12. Every resource presets are visible at first, but after other users allocate resources, it dissapeared.

adrysn avatar Feb 26 '23 03:02 adrysn

Updates

  • When both always_enqueue_session and hideAgents key in the configuration are enabled, then users' max resource limit follows max_***_per_container keys in the configuration file.
  • When always_enqueue_session is enabled but hideAgents is set to false, then the users' max resource limit follows the total amount of resources that the current(selected) resource group contains.

@Sujin-Kim1 @adrysn Could you review this PR?

lizable avatar Mar 06 '23 10:03 lizable

@adrysn Could you review this issue this week?

lizable avatar Mar 14 '23 08:03 lizable

Please resolve the conflict. @Sujin-Kim1

inureyes avatar Apr 17 '23 06:04 inureyes

Is this PR stilll mergable? If the NEO launcher will be introduced soon, it might be better to close this and deal this issue in the new launcher.

adrysn avatar Dec 16 '23 05:12 adrysn