A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
Fix writing benchmark results with tuple keys (#23633)
Signed-off-by: Huy Do <huydhn@gmail.com>
Huy Do committed
Aug 26, 2025 at 04:16 UTC
6ace2f72b03fe41475d7d64e2bfd40b79c447f5b
1 file changed
+6
-1
vllm/benchmarks/lib/utils.py
+6
-1
@@ -54,7 +54,12 @@ class InfEncoder(json.JSONEncoder):
54
55
def clear_inf(self, o: Any):
56
if isinstance(o, dict):
57
- return {k: self.clear_inf(v) for k, v in o.items()}
57
+ return {
58
+ str(k)
59
+ if not isinstance(k, (str, int, float, bool, type(None)))
60
+ else k: self.clear_inf(v)
61
+ for k, v in o.items()
62
+ }
63
elif isinstance(o, list):
64
return [self.clear_inf(v) for v in o]
65
elif isinstance(o, float) and math.isinf(o):