Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gpxrl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
trust-ai
xrl
gpxrl
Commits
391106e8
Commit
391106e8
authored
3 years ago
by
VIDEAU Mathurin
Browse files
Options
Downloads
Patches
Plain Diff
Update utils.py
parent
d1d3530d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GPRL/utils/utils.py
+3
-3
3 additions, 3 deletions
GPRL/utils/utils.py
with
3 additions
and
3 deletions
GPRL/utils/utils.py
+
3
−
3
View file @
391106e8
...
...
@@ -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 (gener
a
tion, 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment