Skip to content

Commit dbb9c1a

Browse files
[Feature]: Allow listing available key resources such as gpu, region, and backends #2142 (WIP)
Fix linter
1 parent 0ff98ef commit dbb9c1a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • src/dstack/_internal/server/services

src/dstack/_internal/server/services/runs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,11 @@ def _process_offers_into_backend_gpus(
13661366
gpu_types_in_offer[gpu_type_key] = 0
13671367
gpu_types_in_offer[gpu_type_key] += 1
13681368

1369-
for (gpu_name, gpu_memory_mib, gpu_vendor), gpu_count_in_offer in gpu_types_in_offer.items():
1369+
for (
1370+
gpu_name,
1371+
gpu_memory_mib,
1372+
gpu_vendor,
1373+
), gpu_count_in_offer in gpu_types_in_offer.items():
13701374
instance_config_key = (
13711375
gpu_name,
13721376
gpu_memory_mib,
@@ -1542,7 +1546,7 @@ async def get_run_gpus_grouped(
15421546
backend_gpus = _process_offers_into_backend_gpus(offers)
15431547

15441548
group_by_set = set(group_by) if group_by else set()
1545-
1549+
15461550
if "backend" in group_by_set and "region" in group_by_set:
15471551
gpus = _get_gpus_grouped_by_backend_and_region(backend_gpus)
15481552
elif "backend" in group_by_set:

0 commit comments

Comments
 (0)