Skip to content

Commit 94a194b

Browse files
committed
fix
1 parent 3a26a6b commit 94a194b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def post(self, tool_name):
138138
else:
139139
num_gpus = subprocess.check_output(["nvidia-smi", "-L"]).decode().split("\n")
140140
num_gpus = [g.strip() for g in num_gpus]
141-
num_gpus = [g for g in num_gpus if g.startswith("GPU ")]
141+
num_gpus = len([g for g in num_gpus if g.startswith("GPU ")])
142142
print(f"Detected {len(num_gpus)} GPUs.")
143143
cuda_devices_map = dict((i, i) for i in range(num_gpus))
144144

0 commit comments

Comments
 (0)