Skip to content

CARL example from README does not run (JOSS blocking) #122

Description

@janikmu

Hi maintainers,

while doing the JOSS review (openjournals/joss-reviews#10439), I tried out all examples from the README and stumbled over the CARL one (https://github.com/automl/Mighty/tree/joss_paper#train-your-agent-on-a-carl-environment).

First of all, I think it's not documented well that I need to do make install-dev to actually get the carl dependency from PyPI - the README makes it seem like I have to follow the installation instructions over at https://github.com/automl/CARL which will obviously not give me a carl callable module in this venv.

Even then, the example fails.
Full trace (without TUI output and module warnings for unused environments):

(Mighty) janik@Mac Mighty % export HYDRA_FULL_ERROR=1
(Mighty) janik@Mac Mighty % python mighty/run_mighty.py 'algorithm=ppo' 'env=CARLCartPole' '+env_kwargs.num_contexts=10' '+env_kwargs.context_feature_args.gravity=[normal, 9.8, 1.0, -100.0, 100.0]' 'env_wrappers=[mighty.mighty_utils.wrappers.FlattenVecObs]' 'algorithm_kwargs.rollout_buffer_kwargs.buffer_size=2048'
--- Warnings truncated ---
[2026-06-07 19:12:15,251][root][INFO] - ################################################################################
[2026-06-07 19:12:15,251][root][INFO] - Using agent type "<mighty.mighty_agents.ppo.MightyPPOAgent object at 0x15fea4790>" to learn
[2026-06-07 19:12:15,251][root][INFO] - ################################################################################
--- TUI output truncated ---
Error executing job with overrides: ['algorithm=ppo', 'env=CARLCartPole', '+env_kwargs.num_contexts=10', '+env_kwargs.context_feature_args.gravity=[normal, 9.8, 1.0, -100.0, 100.0]', 'env_wrappers=[mighty.mighty_utils.wrappers.FlattenVecObs]', 'algorithm_kwargs.rollout_buffer_kwargs.buffer_size=2048']
Traceback (most recent call last):
  File "/Users/janik/source/Mighty/mighty/run_mighty.py", line 30, in <module>
    run_mighty()
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
           ^^^^^^
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
            ^^^^^^^^^^
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
        ^^^^^^^^^^^^^^^^
  File "/Users/janik/source/Mighty/.venv/lib/python3.11/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/Users/janik/source/Mighty/.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/mighty/run_mighty.py", line 18, in run_mighty
    train_result, eval_result = runner.run()
                                ^^^^^^^^^^^^
  File "/Users/janik/source/Mighty/mighty/mighty_runners/mighty_online_runner.py", line 10, in run
    train_results = self.train(self.num_steps)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/janik/source/Mighty/mighty/mighty_runners/mighty_runner.py", line 90, in train
    return self.agent.run(
           ^^^^^^^^^^^^^^^
  File "/Users/janik/source/Mighty/mighty/mighty_agents/base_agent.py", line 699, in run
    t.update(infos)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions