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
5 changes: 4 additions & 1 deletion hpobench/container/recipes/ml/Singularity.ml_mmfb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ VERSION v0.0.1
cd /home \
&& git clone https://github.com/automl/HPOBench.git \
&& cd HPOBench \
&& git checkout development \
&& git checkout master \
&& pip install ".[ml_mfbb]" \
&& cd / \
&& mkdir /var/lib/hpobench/ \
&& mkdir /var/lib/hpobench/cache \
&& mkdir /var/lib/hpobench/data \
&& mkdir /var/lib/hpobench/socket \
&& chmod -R 777 /var/lib/hpobench/ \
&& pip cache purge \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 3 additions & 0 deletions hpobench/container/recipes/nas/Singularity.nasbench_201
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ VERSION v0.0.1
&& pip install . \
&& cd / \
&& mkdir /var/lib/hpobench/ \
&& mkdir /var/lib/hpobench/cache \
&& mkdir /var/lib/hpobench/data \
&& mkdir /var/lib/hpobench/socket \
&& chmod -R 777 /var/lib/hpobench/ \
&& rm -rf /var/lib/apt/lists/* \
&& pip cache purge
Expand Down
11 changes: 11 additions & 0 deletions hpobench/container/server_abstract_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def __init__(self, socket_id):
# start the event loop of the server to wait for calls
self.daemon.requestLoop(loopCondition=lambda: self.pyro_running)

def print_hello_world(self):
logger.debug('Server: Hello World!')
return 'Hello World!'

def init_benchmark(self, kwargs_str):
try:
kwargs = json.loads(kwargs_str, cls=BenchmarkDecoder)
Expand Down Expand Up @@ -128,5 +132,12 @@ def shutdown(self):
args = parser.parse_args()

# pylint: disable=logging-fstring-interpolation
logger.debug(f'args: {args}')
logger.debug(f'args.importBase: {args.importBase}')
logger.debug(f'args.benchmark: {args.benchmark}')
logger.debug(f'args.socket_id: {args.socket_id}')
exec(f"from hpobench.benchmarks.{args.importBase} import {args.benchmark} as Benchmark")
logger.debug(f'import worked')
bp = BenchmarkServer(args.socket_id)
logger.debug(f'BenchmarkServer started')
logger.debug(f'BenchmarkServer: {bp}')
4 changes: 2 additions & 2 deletions hpobench/util/container_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def object_hook(self, obj: Any) -> Union[Union[tuple, np.ndarray, float, float,
if __type == 'np.ndarray':
return np.array(obj['__items__'])
if __type == 'np.float':
return np.float(obj['__items__'])
return float(obj['__items__'])
if __type == 'np.int':
return np.int(obj['__items__'])
return int(obj['__items__'])
if __type == 'random_state':
return deserialize_random_state(obj['__items__'])
return obj
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def read_file(file_name):
version=read_file('hpobench/__version__.py').split()[-1].strip('\''),
packages=setuptools.find_packages(exclude=['*.tests', '*.tests.*',
'tests.*', 'tests'],),
python_requires='>=3.6, <=3.10',
python_requires='>=3.6',
install_requires=read_file('./requirements.txt').split('\n'),
extras_require=get_extra_requirements(),
test_suite='pytest',
Expand All @@ -48,6 +48,7 @@ def read_file(file_name):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Development Status :: 3 - Alpha',
'Natural Language :: English',
'Environment :: Console',
Expand Down
Loading