Restore policy observation spaces different
When restoring a SB3 policy for an RLBench environment, the verification env.obs_space==alg.obs_space fails because we determine the bounds by sampling for RLBench envs. Therefore they are never the same.
A workaround is to outcomment line 670 in stable_baselines3.common.base_class.py
: check_for_correct_spaces(env, data["observation_space"], data["action_space"])
A monkeypatch
import stable_baselines3
stable_baselines3.common.utils.check_for_correct_spaces = lambda *args, **kwargs: True
also does not solve the problem because it only effects the current file.
Either we ensure that the env.observation_space is always the same or we live-patch the library files