Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ There are two main ways to interact with Hypermapper: either by using calling it
import hypermapper
hypermapper.optimize("json_name.py", blackbox-function)
```
if you have a python interface to your application, or through the client-server functionality that interacts with your application through the terminal. In either case, a .json scenario file is required that sets up the optimization. This is where the input parameters are given as well as other run settings. Examples of scenario files can be found in tests/aux and the full template is found in hypermapper/schema.json.
if you have a python interface to your application, or through the client-server functionality that interacts with your application through the terminal. In either case, a .json scenario file is required that sets up the optimization. This is where the input parameters are given as well as other run settings. Examples of scenario files can be found in tests/auxiliary and the full template is found in hypermapper/schema.json.

# Running Hypermapper with a black-box function
To run it with a blackbox function, simply call the optimize() routine with a callable python-function and the name of the scenario file.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/aux/test_cli.py → tests/auxiliary/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aux.functions import branin4_function
from auxiliary.functions import branin4_function
import hypermapper
import sys
from subprocess import Popen, PIPE
Expand All @@ -14,7 +14,7 @@ def branin4_cli(path, json="branin4_scenario_cli.json"):
cmd = [
"python",
os.path.join(f"{path}", "..", "hypermapper", "run.py"),
os.path.join(f"{path}", "..", "tests", "aux", json),
os.path.join(f"{path}", "..", "tests", "auxiliary", json),
]
print(cmd) # Command to launch Hypermapper
p = Popen(
Expand Down
12 changes: 6 additions & 6 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from matplotlib import pyplot as plt

import hypermapper # noqa
from aux.functions import *
from aux.test_cli import branin4_cli
from auxiliary.functions import *
from auxiliary.test_cli import branin4_cli
from typing import Callable, Optional, List, Dict
from hypermapper.util.file import read_settings_file

Expand All @@ -16,13 +16,13 @@


def runBenchmark(scenario: str, function: Callable, output_file: Optional[str] = None):
settings_file = os.path.join(f"{testing_directory}", "aux", f"{scenario}.json")
settings_file = os.path.join(f"{testing_directory}", "auxiliary", f"{scenario}.json")
settings = read_settings_file(settings_file)
settings["log_file"] = os.path.join(
f"{testing_directory}", "logs", f"{scenario.split('.')[0]}.log"
)
settings["resume_optimization_file"] = os.path.join(
f"{testing_directory}", "aux", f"{settings['resume_optimization_file']}"
f"{testing_directory}", "auxiliary", f"{settings['resume_optimization_file']}"
)
if output_file:
settings["output_data_file"] = os.path.join(
Expand All @@ -49,7 +49,7 @@ def run_performance_test(
for filename, function, bname in zip(setting_files, functions, benchmark_names):
for setting, name in zip(additional_settings, names):
settings_file = os.path.join(
f"{testing_directory}", "aux", f"{filename}.json"
f"{testing_directory}", "auxiliary", f"{filename}.json"
)
settings = read_settings_file(settings_file)
settings.update(setting)
Expand Down Expand Up @@ -294,7 +294,7 @@ def crash_test():

# RS
settings_file = os.path.join(
f"{testing_directory}", "aux", "branin4_scenario_gp.json"
f"{testing_directory}", "auxiliary", "branin4_scenario_gp.json"
)
settings = read_settings_file(settings_file)
settings["log_file"] = os.path.join(
Expand Down