From 345b9bfd6ad67a3ed1cbb77be6b387d66db59f8d Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 9 Jun 2023 03:09:23 -0400 Subject: [PATCH] Final fix for select_workload() --- OpenBench/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBench/utils.py b/OpenBench/utils.py index 633337b..7c62508 100644 --- a/OpenBench/utils.py +++ b/OpenBench/utils.py @@ -565,7 +565,7 @@ def select_workload(machine, tests, variance=0.25): # No test has less than (1-variance)% of its deserved resources, and # therefore we may have this machine repeat its existing workload again - ideal_ratio = sum([x['cores'] for x in table]) / sum([x['throughput'] for x in table]) + ideal_ratio = sum([x['cores'] for x in table.values()]) / sum([x['throughput'] for x in table.values()]) if min(ratios) / ideal_ratio > 1 - variance: return OpenBench.models.Test.objects(id=machine.workload)