SMAC package now required for using storage API
Closed this issue · 2 comments
eujing commented
When trying to use the storage API from a python env that only has mlos_core
and mlos_bench
installed without optional deps, we now get an import error where smac
is required.
This dependency was likely introduced in #852 with the top-level import of smac
in smac_optimizer.py
dashboard-1 | Traceback (most recent call last):
dashboard-1 | File "/root/.local/bin/run_dashboard", line 5, in <module>
dashboard-1 | from dashboard.run import run
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/dashboard/run.py", line 4, in <module>
dashboard-1 | from dashboard import main
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/dashboard/main.py", line 5, in <module>
dashboard-1 | from mlos_bench.storage import Storage
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_bench/storage/__init__.py", line 167, in <module>
dashboard-1 | from mlos_bench.storage.storage_factory import from_config
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_bench/storage/storage_factory.py", line 18, in <module>
dashboard-1 | from mlos_bench.services.config_persistence import ConfigPersistenceService
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_bench/services/config_persistence.py", line 30, in <module>
dashboard-1 | from mlos_bench.optimizers.base_optimizer import Optimizer
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_bench/optimizers/__init__.py", line 14, in <module>
dashboard-1 | from mlos_bench.optimizers.mlos_core_optimizer import MlosCoreOptimizer
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_bench/optimizers/mlos_core_optimizer.py", line 25, in <module>
dashboard-1 | from mlos_core.optimizers import (
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_core/optimizers/__init__.py", line 36, in <module>
dashboard-1 | from mlos_core.optimizers.bayesian_optimizers.smac_optimizer import SmacOptimizer
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_core/optimizers/bayesian_optimizers/__init__.py", line 10, in <module>
dashboard-1 | from mlos_core.optimizers.bayesian_optimizers.smac_optimizer import SmacOptimizer
dashboard-1 | File "/root/.local/lib/python3.12/site-packages/mlos_core/optimizers/bayesian_optimizers/smac_optimizer.py", line 23, in <module>
dashboard-1 | from smac.utils.configspace import convert_configurations_to_array
dashboard-1 | ModuleNotFoundError: No module named 'smac'
bpkroth commented
Thanks for catching!