automl / automl/mighty_dr_example
Runscripts not working
- Dominant language
- Jupyter Notebook
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
while doing the JOSS review for `Mighty` (https://github.com/openjournals/joss-reviews/issues/10439) I came across this example project.
The README says "Everything should immediately be runnable locally" - with which I agree for an example project 😉 - but unfortunately after `make install` in a fresh Python 3.11 venvI was not able to run either (TUI output truncated):
```bash
(mighty_dr_example) janik@Mac mighty_dr_example % export HYDRA_FULL_ERROR=1
(mighty_dr_example) janik@Mac mighty_dr_example % python mighty_domain_randomization/run_mighty.py --config-name=hpo environment=contextual_minigrid cluster=local -m
Couldn't import CARP-S, the CARP-S Hypersweeper will not be available.
Couldn't import DEHB, the DEHB Hypersweeper will not be available.
Couldn't import HEBO, the HEBO Hypersweeper will not be available.
Couldn't import NEPS, the NEPS Hypersweeper will not be available.
Couldn't import Nevergrad, the Nevergrad Hypersweeper will not be available.
Traceback (most recent call last):
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 635, in _locate
obj = import_module(part0)
^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/.local/share/uv/python/cpython-3.11.15-macos-aarch64-none/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/smac/__init__.py", line 28, in
from smac.facade import (
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/smac/facade/__init__.py", line 2, in
from smac.facade.algorithm_configuration_facade import AlgorithmConfigurationFacade
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/smac/facade/algorithm_configuration_facade.py", line 12, in
from smac.model.random_forest.random_forest import RandomForest
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/smac/model/random_forest/__init__.py", line 2, in
from smac.model.random_forest.random_forest import RandomForest
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/smac/model/random_forest/random_forest.py", line 14, in
from sklearn.tree._tree import DTYPE
ImportError: cannot import name 'DTYPE' from 'sklearn.tree._tree' (/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/sklearn/tree/_tree.cpython-311-darwin.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 134, in _resolve_target
target = _locate(target)
^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 637, in _locate
raise ImportError(
ImportError: Error loading 'smac.facade.blackbox_facade.BlackBoxFacade':
ImportError("cannot import name 'DTYPE' from 'sklearn.tree._tree' (/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/sklearn/tree/_tree.cpython-311-darwin.so)")
Are you sure that module 'smac' is installed?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/janik/source/mighty_dr_example/mighty_domain_randomization/run_mighty.py", line 35, in
run_mighty()
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 465, in _run_app
run_and_report(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 466, in
lambda: hydra.multirun(
^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 153, in multirun
sweeper = Plugins.instance().instantiate_sweeper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/core/plugins.py", line 138, in instantiate_sweeper
sweeper = self._instantiate(config.hydra.sweeper)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/core/plugins.py", line 112, in _instantiate
plugin = instantiate(config=config, _target_=clazz)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate
return instantiate_node(
^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 342, in instantiate_node
value = instantiate_node(
^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 366, in instantiate_node
cfg[key] = instantiate_node(
^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 366, in instantiate_node
cfg[key] = instantiate_node(
^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 333, in instantiate_node
_target_ = _resolve_target(node.get(_Keys.TARGET), full_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 139, in _resolve_target
raise InstantiationException(msg) from e
hydra.errors.InstantiationException: Error locating target 'smac.facade.blackbox_facade.BlackBoxFacade', set env var HYDRA_FULL_ERROR=1 to see chained exception.
full_key: hydra.sweeper.sweeper_kwargs.optimizer_kwargs.smac_facade
```
or (TUI output truncated)
```bash
(mighty_dr_example) janik@Mac mighty_dr_example % python mighty_domain_randomization/run_mighty.py --config-name=dr_curriculum environment=contextual_minigrid env=MiniGrid-Empty-Random-5x5-v0 seed=0,1,2,3,4 -m
Couldn't import CARP-S, the CARP-S Hypersweeper will not be available.
Couldn't import DEHB, the DEHB Hypersweeper will not be available.
Couldn't import HEBO, the HEBO Hypersweeper will not be available.
Couldn't import NEPS, the NEPS Hypersweeper will not be available.
Couldn't import Nevergrad, the Nevergrad Hypersweeper will not be available.
[2026-06-07 20:07:42,598][HYDRA] Launching 5 jobs locally
[2026-06-07 20:07:42,598][HYDRA] #0 : environment=contextual_minigrid env=MiniGrid-Empty-Random-5x5-v0 seed=0
[2026-06-07 20:07:45,999][root][INFO] - ################################################################################
[2026-06-07 20:07:45,999][root][INFO] - Using agent type "" to learn
[2026-06-07 20:07:45,999][root][INFO] - ################################################################################
--- TUI truncated ---
[2026-06-07 20:07:46,183][HYDRA] #2 : environment=contextual_minigrid env=MiniGrid-Empty-Random-5x5-v0 seed=2
[2026-06-07 20:07:46,244][root][INFO] - ################################################################################
[2026-06-07 20:07:46,244][root][INFO] - Using agent type "" to learn
[2026-06-07 20:07:46,244][root][INFO] - ################################################################################
--- TUI truncated ---
[2026-06-07 20:07:46,258][HYDRA] #3 : environment=contextual_minigrid env=MiniGrid-Empty-Random-5x5-v0 seed=3
[2026-06-07 20:07:46,320][root][INFO] - ################################################################################
[2026-06-07 20:07:46,320][root][INFO] - Using agent type "" to learn
[2026-06-07 20:07:46,320][root][INFO] - ################################################################################
--- TUI truncated ---
[2026-06-07 20:07:46,334][HYDRA] #4 : environment=contextual_minigrid env=MiniGrid-Empty-Random-5x5-v0 seed=4
[2026-06-07 20:07:46,394][root][INFO] - ################################################################################
[2026-06-07 20:07:46,394][root][INFO] - Using agent type "" to learn
[2026-06-07 20:07:46,394][root][INFO] - ################################################################################
--- TUI truncated ---
Error executing job with overrides: ['environment=contextual_minigrid', 'env=MiniGrid-Empty-Random-5x5-v0', 'seed=0']
Traceback (most recent call last):
File "/Users/janik/source/mighty_dr_example/mighty_domain_randomization/run_mighty.py", line 35, in
run_mighty()
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 465, in _run_app
run_and_report(
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 466, in
lambda: hydra.multirun(
^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 162, in multirun
ret = sweeper.sweep(arguments=task_overrides)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/_internal/core_plugins/basic_sweeper.py", line 181, in sweep
_ = r.return_value
^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/mighty_domain_randomization/run_mighty.py", line 23, in run_mighty
train_result, eval_result = runner.run()
^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/mighty/mighty_runners/mighty_online_runner.py", line 10, in run
train_results = self.train(self.num_steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/mighty/mighty_runners/mighty_runner.py", line 83, in train
return self.agent.run(
^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/mighty/mighty_agents/base_agent.py", line 609, in run
action, log_prob = self.step(curr_s, metrics)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/mighty/mighty_agents/base_agent.py", line 407, in step
self.meta_modules[k].pre_step(metrics)
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/mighty/mighty_meta/mighty_component.py", line 31, in pre_step
m(metrics)
File "/Users/janik/source/mighty_dr_example/mighty_domain_randomization/mighty_syllabus_dr.py", line 70, in init
self.make_curriculum(metrics["env"], self.curriculum_config)
File "/Users/janik/source/mighty_dr_example/mighty_domain_randomization/mighty_syllabus_dr.py", line 41, in make_curriculum
self.curriculum = BatchedDomainRandomization(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/syllabus/curricula/domain_randomization.py", line 26, in __init__
super().__init__(task_space, **kwargs)
File "/Users/janik/source/mighty_dr_example/.venv/lib/python3.11/site-packages/syllabus/core/curriculum_base.py", line 42, in __init__
self.wandb_table = wandb.Table(columns=["global_step", "Top tasks", "Probabilities"], log_mode='MUTABLE')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Table.__init__() got an unexpected keyword argument 'log_mode'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at mighty_domain_randomization/run_mighty.py and reproduce both commands in a fresh Python 3.11 virtual environment after `make install`. Trace the SMAC/scikit-learn import failure and the separate Hydra multirun failure shown in the report. Done means both example runs complete without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100