Coverage for sparkle/configurator/implementations/__init__.py: 43%
7 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-27 09:10 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-27 09:10 +0000
1"""This package provides specific Configurator class implementations for Sparkle."""
2from sparkle.configurator.configurator import Configurator
3from sparkle.configurator.implementations.smac2 import SMAC2, SMAC2Scenario
6def resolve_configurator(configurator_name: str) -> Configurator:
7 """Returns the Configurator subclass by name."""
8 subclass_names = [SMAC2.__name__]
9 if configurator_name in subclass_names:
10 return eval(configurator_name)
11 return None