Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CCS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Brice Videau
CCS
Commits
cc98c2aa
Commit
cc98c2aa
authored
Jul 30, 2020
by
Brice Videau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using local variables.
parent
01498aaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
bindings/python/test/test_tuner.py
bindings/python/test/test_tuner.py
+2
-6
No files found.
bindings/python/test/test_tuner.py
View file @
cc98c2aa
...
@@ -42,9 +42,7 @@ class TestTuner(unittest.TestCase):
...
@@ -42,9 +42,7 @@ class TestTuner(unittest.TestCase):
self
.
assertTrue
(
all
(
objs
[
i
][
1
]
>=
objs
[
i
+
1
][
1
]
for
i
in
range
(
len
(
objs
)
-
1
)))
self
.
assertTrue
(
all
(
objs
[
i
][
1
]
>=
objs
[
i
+
1
][
1
]
for
i
in
range
(
len
(
objs
)
-
1
)))
def
test_user_defined
(
self
):
def
test_user_defined
(
self
):
global
history
history
=
[]
history
=
[]
global
optimums
optimums
=
[]
optimums
=
[]
def
delete
(
data
):
def
delete
(
data
):
...
@@ -58,8 +56,8 @@ class TestTuner(unittest.TestCase):
...
@@ -58,8 +56,8 @@ class TestTuner(unittest.TestCase):
return
(
cs
.
samples
(
count
),
count
)
return
(
cs
.
samples
(
count
),
count
)
def
tell
(
data
,
evaluations
):
def
tell
(
data
,
evaluations
):
glob
al
history
nonloc
al
history
glob
al
optimums
nonloc
al
optimums
history
+=
evaluations
history
+=
evaluations
for
e
in
evaluations
:
for
e
in
evaluations
:
discard
=
False
discard
=
False
...
@@ -80,11 +78,9 @@ class TestTuner(unittest.TestCase):
...
@@ -80,11 +78,9 @@ class TestTuner(unittest.TestCase):
return
None
return
None
def
get_history
(
data
):
def
get_history
(
data
):
global
history
return
history
return
history
def
get_optimums
(
data
):
def
get_optimums
(
data
):
global
optimums
return
optimums
return
optimums
(
cs
,
os
)
=
self
.
create_tuning_problem
()
(
cs
,
os
)
=
self
.
create_tuning_problem
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment