Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TopFarm2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
TOPFARM
TopFarm2
Commits
26e10191
Commit
26e10191
authored
5 years ago
by
Pierre-Elouan Rethore
Browse files
Options
Downloads
Patches
Plain Diff
fixing the recording in parallel for the random_search_driver
parent
b36cf9ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!127
Electrical cost and Parallel RandomSearch
Pipeline
#9921
failed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
topfarm/drivers/random_search_driver.py
+2
-1
2 additions, 1 deletion
topfarm/drivers/random_search_driver.py
with
2 additions
and
1 deletion
topfarm/drivers/random_search_driver.py
+
2
−
1
View file @
26e10191
...
@@ -203,6 +203,7 @@ class RandomSearchDriver(Driver):
...
@@ -203,6 +203,7 @@ class RandomSearchDriver(Driver):
if
one_success
:
if
one_success
:
n_iter
+=
1
n_iter
+=
1
if
disp
and
comm
.
rank
==
0
:
if
disp
and
comm
.
rank
==
0
:
obj_value_x0
,
success
=
self
.
objective_callback
(
x0
,
record
=
True
)
print
(
'
rank:
'
,
comm
.
rank
,
n_iter
,
obj_value_x0
)
print
(
'
rank:
'
,
comm
.
rank
,
n_iter
,
obj_value_x0
)
else
:
else
:
## We only use one CPU
## We only use one CPU
...
@@ -227,7 +228,7 @@ class RandomSearchDriver(Driver):
...
@@ -227,7 +228,7 @@ class RandomSearchDriver(Driver):
obj_value_x1
,
success
=
self
.
objective_callback
(
x0
,
record
=
True
)
obj_value_x1
,
success
=
self
.
objective_callback
(
x0
,
record
=
True
)
return
False
return
False
def
objective_callback
(
self
,
x
,
record
=
Tru
e
):
def
objective_callback
(
self
,
x
,
record
=
Fals
e
):
"""
"""
Evaluate problem objective at the requested point.
Evaluate problem objective at the requested point.
...
...
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