Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 391106e8 authored by VIDEAU Mathurin's avatar VIDEAU Mathurin
Browse files

Update utils.py

parent d1d3530d
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment