Skip to content
Snippets Groups Projects
Commit e04f5020 authored by Christoph Kowalski's avatar Christoph Kowalski
Browse files

Adapted gym env to only del a visualizer if the environment name is in the...

Adapted gym env to only del a visualizer if the environment name is in the dictionary, as this is not the case during intialization of the rl env.
parent 29458598
No related branches found
No related tags found
2 merge requests!110V1.2.0 changes,!103Integrated overcooked-ai into cooperative cuisine.
Pipeline #59219 passed
......@@ -8,10 +8,10 @@ model_type_inference:
_partial_: true
_target_: stable_baselines3.PPO.load
total_timesteps: 3_000_000 # hendric sagt eher so 300_000_000 schritte
number_envs_parallel: 64
number_envs_parallel: 16
learning_rate: 0.0003
n_steps: 2048
batch_size: 64
batch_size: 16
n_epochs: 10
gamma: 0.99
gae_lambda: 0.95
......
......@@ -155,7 +155,7 @@ class EnvGymWrapper(Env):
super().__init__()
self.randomize_counter_placement = False
self.use_rgb_obs = True # if False uses simple vectorized state
self.use_rgb_obs = False # if False uses simple vectorized state
self.full_vector_state = True
config_env = OmegaConf.to_container(config.environment, resolve=True)
config_item_info = OmegaConf.to_container(config.item_info, resolve=True)
......@@ -258,7 +258,8 @@ class EnvGymWrapper(Env):
"""
Resets the environment according to the configs
"""
del visualizer.surface_cache_dict[self.env.env_name]
if self.env.env_name in visualizer.surface_cache_dict:
del visualizer.surface_cache_dict[self.env.env_name]
self.env: Environment = Environment(
env_config=deepcopy(self.config_env),
layout_config=self.layout,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment