0

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?

CMOS-Y
  • 3
  • 4

1 Answers1

2

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.

Mahesha999
  • 22,693
  • 29
  • 116
  • 189
  • @Mahesa999 Will this work with the FetchReach-v1 gym environment? – CMOS-Y Jun 23 '21 at 19:50
  • The error is regarding stable baselines which is independent of any specific gym. So, yes, it will work as there is no connection between the error and the specified gym environment. – Mahesha999 Jun 23 '21 at 21:32
  • I have created a CustomPPO class and a CustomActorCrticClass. But they both have different observations when I call model.learn. This leads to an error. Can you help? – CMOS-Y Jun 25 '21 at 12:36
  • May be you can just post a new question on stackoverflow for the same. Also one more suggestion, you can ask on [reinforcement learning subreddit](https://www.reddit.com/r/reinforcementlearning/). Its quite active and sb3 devs do reply there. Also they have [discord server](https://discord.gg/pckJqYps) too. And if above answer resolves the question you asked, please dont forget to mark it as an answer. – Mahesha999 Jun 25 '21 at 14:16
  • Could you please answer this:https://stackoverflow.com/questions/68223761/monitor-wrapper-openai-gym – CMOS-Y Jul 02 '21 at 12:27