File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1231,14 +1231,12 @@ async def assign_available_gpu(scenario_data, role):
1231
1231
if scenario_data ["accelerator" ] == "cpu" :
1232
1232
scenario_data ["gpu_id" ] = []
1233
1233
else :
1234
- available_gpus = await get_available_gpus ()
1235
-
1234
+ response = await get_available_gpus ()
1235
+ available_gpus = response . get ( "available_gpus" )
1236
1236
if role == "user" :
1237
- json_available_gpus = available_gpus .pop ()
1238
- scenario_data ["gpu_id" ] = json_available_gpus
1237
+ scenario_data ["gpu_id" ] = available_gpus .pop ()
1239
1238
elif role == "admin" :
1240
- json_available_gpus = available_gpus
1241
- scenario_data ["gpu_id" ] = json_available_gpus
1239
+ scenario_data ["gpu_id" ] = available_gpus
1242
1240
else :
1243
1241
scenario_data ["gpu_id" ] = []
1244
1242
You can’t perform that action at this time.
0 commit comments