From 391106e85d2840f6e46b0a1ace5694d355e0a77f Mon Sep 17 00:00:00 2001
From: VIDEAU Mathurin <mathurin.videau@inria.fr>
Date: Thu, 28 Oct 2021 22:55:52 +0000
Subject: [PATCH] Update utils.py

---
 GPRL/utils/utils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/GPRL/utils/utils.py b/GPRL/utils/utils.py
index 1ed935c..0f96050 100644
--- a/GPRL/utils/utils.py
+++ b/GPRL/utils/utils.py
@@ -35,9 +35,9 @@ def convert_logbook_to_dataframe(logbook):
         df[k] = d
     return df
 
-def basic_budget_scheduler(gen_threshold):# list of tuple (genertion, simulation_budget)
+def basic_budget_scheduler(gen_threshold):# list of tuple (generation, simulation_budget)
     def scheduler(gen, population, simulation_budget, parallel_update):
-        for g, v in gen_threshold:
+        for g, v in reversed(gen_threshold):
             if gen>g:
                 return v, parallel_update
         return simulation_budget, parallel_update
@@ -49,4 +49,4 @@ def save_each_generation(path, modulo=10):
         if i%modulo == 0:
             with open(os.path.join(path,"data-"+str(i)+".pkl"), "wb") as input_file:
                 pickle.dump(data, input_file, pickle.HIGHEST_PROTOCOL)
-    return save
\ No newline at end of file
+    return save
-- 
GitLab