From bf15be1e1f4279f80660f0aa1f191f774a4ebc52 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 9 Jun 2023 03:10:09 -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 7c62508..dbbd8ec 100644 --- a/OpenBench/utils.py +++ b/OpenBench/utils.py @@ -567,7 +567,7 @@ def select_workload(machine, tests, variance=0.25): # therefore we may have this machine repeat its existing workload again 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) + return OpenBench.models.Test.objects.get(id=machine.workload) # Fallback to simply doing the least attention given test return tests[random.choice(lowest_idxs)]