-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from HDI-Project/fix-btbsession-and-integrati…
…on-tests Fix btbsession and integration tests
- Loading branch information
Showing
7 changed files
with
378 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
import numpy as np | ||
|
||
from btb.benchmark import benchmark | ||
from btb.benchmark.challenges import Rosenbrock | ||
from btb.benchmark.tuners.btb import make_tuning_function | ||
from btb.tuning import GPTuner | ||
|
||
|
||
def test_benchmark_rosenbrock(): | ||
# run | ||
candidate = make_tuning_function(GPTuner) | ||
df = benchmark(candidate, challenges=Rosenbrock(), iterations=1) | ||
|
||
# Assert | ||
np.testing.assert_equal(df.columns.values, ['Rosenbrock()', 'Mean', 'Std']) | ||
np.testing.assert_equal(df.index.values, ['tuning_function']) | ||
np.testing.assert_equal(df.dtypes.values, [np.int, np.float, np.float]) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.