You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to train babyai env on specific instructions, but while setting up the seed it gets stuck on first frame and doesn't do anything. The issue seems to be with Custom env because when I run the code without it, the seed works fine. Help from the community would be much appreciated :)
The text was updated successfully, but these errors were encountered:
Question
`# Create the training environment
train_env = gym.make("BabyAI-GoToLocal-v0",max_episode_steps= 512)#, render_mode = "human")
train_env = RGBImgPartialObsWrapper(train_env)
train_env = CustomEnv(train_env, mission)
train_env = ImgObsWrapper(train_env)
train_env = Monitor(train_env)
train_env = DummyVecEnv([lambda: train_env])
train_env = VecTransposeImage(train_env)
Create the evaluation environment
eval_env = gym.make("BabyAI-GoToLocal-v0", max_episode_steps= 512)#, render_mode = "human")
eval_env = RGBImgPartialObsWrapper(eval_env)
eval_env = CustomEnv(eval_env,mission)
eval_env = ImgObsWrapper(eval_env)
eval_env = Monitor(eval_env)
eval_env = DummyVecEnv([lambda: eval_env])
eval_env = VecTransposeImage(eval_env)
save_path = f"main_code/New_model/PPO/{mission.replace(' ', '_')}_model"
eval_callback = EvalCallback(eval_env, callback_on_new_best=stop_callback, eval_freq=8192,
best_model_save_path=save_path, verbose=1, n_eval_episodes= 30)
model = PPO("CnnPolicy", train_env, policy_kwargs=policy_kwargs, verbose=1,
learning_rate=0.0005, tensorboard_log="./logs/PPO2/",
batch_size= 2048,
n_epochs= 100, seed = 42)
model.learn(2.5e6, callback=eval_callback)
Close the environments
train_env.close()
eval_env.close()`
I'm trying to train babyai env on specific instructions, but while setting up the seed it gets stuck on first frame and doesn't do anything. The issue seems to be with Custom env because when I run the code without it, the seed works fine. Help from the community would be much appreciated :)
The text was updated successfully, but these errors were encountered: