From 6bbbeeeaad721dc7469dd901c11b753757202981 Mon Sep 17 00:00:00 2001 From: andrew Date: Wed, 31 Jan 2024 00:09:21 -0500 Subject: [PATCH] Fix explicit filtering with id= in some Django versions --- OpenBench/workloads/get_workload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBench/workloads/get_workload.py b/OpenBench/workloads/get_workload.py index 646bac8..bacafb6 100644 --- a/OpenBench/workloads/get_workload.py +++ b/OpenBench/workloads/get_workload.py @@ -79,7 +79,7 @@ def select_workload(machine): # Step 6: Repeat the same machine, if we are still at least 75% fair across the board if machine.workload in worker_dist.keys(): if thread_sum > 0 and min_ratio / fair_ratio > 0.75: - return Test.objects.get(machine.workload) + return Test.objects.get(id=machine.workload) # Step 7: Pick a random test, amongst those who share the min_ratio, weighted by throughput choices = [id for id, data in worker_dist.items() if data['ratio'] == min_ratio]