Bugfix: set max values of session slider based on `keypair_limits` and `hideAgents` setting when `alwaysEnqueueComputeSession` is true
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.
For me, this is not working. I confirmed that the
hideAgentandalwaysEnqueueComputeSessionare set totrue.I have three resource presets:
I set the user's resource policy to 4 cores, 8 GB memory, and 0.5 fGPU.
So, at least the resource preset
GPU-Supporshould appear in the list. But, nothing is displayed in the user's session launcher. Also, GPU slider is disabled.![]()
When I change the resource policy of the user with unlimited values:
I see two resource presets (I don't know why
GPU-Fullis not displayed):
@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.
I used ngc-pytorch:22.12. Every resource presets are visible at first, but after other users allocate resources, it dissapeared.
Updates
- When both
always_enqueue_sessionandhideAgentskey in the configuration are enabled, then users' max resource limit followsmax_***_per_container keysin the configuration file. - When
always_enqueue_sessionis enabled buthideAgentsis set tofalse, 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?
@adrysn Could you review this issue this week?
Please resolve the conflict. @Sujin-Kim1
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.




