Search code examples
openai-gymstable-baselines

Stablebaselines MultiInputpolicies


I tried to use the MultiInputPolicy by :

model = PPO("MultiInputPolicy", env, verbose = 1)

But, I get an error:

KeyError: "Error: unknown policy type MultiInputPolicy,the only registed policy type are: ['MlpPolicy', 'CnnPolicy']!"

Please help. How can I fix this?


Solution

  • You seem to have older version of stable-baselines3 installed. If you have installed using

    pip install stable-baselines3
    

    , it may not be the latest release from master branch. Install from latest master branch:

    pip install git+https://github.com/DLR-RM/stable-baselines3.git
    

    For pipenv, you may have to specify egg:

    pipenv install git+https://github.com/DLR-RM/stable-baselines3.git#egg=stable_baselines3
    

    MultiInputPolicy is added on 11 May. The latest pypi release is of 17 March.