Closed Chainesh closed 4 months ago
Probably comes from this
while self.env.mission != self.mission:
obs = self.env.reset(**kwargs)
You indefinitely sample an observation with the same seed. So you always get the same result.
However, note that this isn't really a question related to sb3, I'd advise you to ask it on the gymnasium repo instead.
while self.env.mission != self.mission: obs = self.env.reset(**kwargs)
What do I need to change here? I'm trying to train Babyai Levels on specific instructions, so I need to do that. Yeah sure I'll do that, thanks for the reply :)
Please link the gymnasium issue here before closing :)
https://github.com/Farama-Foundation/Gymnasium/issues/1061#issue-2310882993 I've opened the issue here :)
🐛 Bug
check_env(env) doesn't show anything and while running the below code I don't see any output, after using render mode I can it's stuck at first frame. Maybe the issue is with the Custom Env. Thanks :)
Code example
import gymnasium as gym from feauture_extractor import MinigridFeaturesExtractor from minigrid.wrappers import ImgObsWrapper from stable_baselines3 import PPO from stable_baselines3.common.callbacks import EvalCallback from stable_baselines3.common.monitor import Monitor from stable_baselines3.common.callbacks import StopTrainingOnRewardThreshold from stable_baselines3.common.vec_env import VecTransposeImage, DummyVecEnv from minigrid.wrappers import RGBImgPartialObsWrapper import tensorboard
missions = [ "go to the red key", ]
stop_callback = StopTrainingOnRewardThreshold(reward_threshold=0.925, verbose=1)
class CustomEnv(gym.Env): def init(self, env, mission): self.env = env self.observation_space = env.observation_space self.action_space = env.action_space self.mission = mission
for mission in missions: policy_kwargs = dict( net_arch = dict(pi=[64,128],vf=[64,128]) )
Relevant log output / Error message
System Info
Checklist