Commit d1d6519d authored by nilabha's avatar nilabha

Update seeds in env_config

parent 6f5e851d
......@@ -22,6 +22,11 @@ class FlatlandSingle(gym.Env):
def __init__(self, env_config):
self._observation = make_obs(env_config['observation'], env_config.get('observation_config'))
self._config = get_generator_config(env_config['generator_config'])
# Overwrites with env_config seed if it exists
if env_config.get('seed'):
self._config['seed'] = env_config.get('seed')
self._env = FlatlandGymEnv(
rail_env=self._launch(),
observation_space=self._observation.observation_space(),
......
......@@ -29,6 +29,10 @@ class FlatlandSparse(FlatlandBase):
self._observation = make_obs(env_config['observation'], env_config.get('observation_config'))
self._config = get_generator_config(env_config['generator_config'])
# Overwrites with env_config seed if it exists
if env_config.get('seed'):
self._config['seed'] = env_config.get('seed')
if not hasattr(env_config, 'worker_index') or (env_config.worker_index == 0 and env_config.vector_index == 0):
print("=" * 50)
pprint(self._config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment