Skip to content

Commit

Permalink
entrypoint variable made public (openai#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoBach authored and pzhokhov committed Aug 5, 2019
1 parent 1fb4dfb commit 0182fe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baselines/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
_game_envs = defaultdict(set)
for env in gym.envs.registry.all():
# TODO: solve this with regexes
env_type = env._entry_point.split(':')[0].split('.')[-1]
env_type = env.entry_point.split(':')[0].split('.')[-1]
_game_envs[env_type].add(env.id)

# reading benchmark names directly from retro requires
Expand Down Expand Up @@ -126,7 +126,7 @@ def get_env_type(args):

# Re-parse the gym registry, since we could have new envs since last time.
for env in gym.envs.registry.all():
env_type = env._entry_point.split(':')[0].split('.')[-1]
env_type = env.entry_point.split(':')[0].split('.')[-1]
_game_envs[env_type].add(env.id) # This is a set so add is idempotent

if env_id in _game_envs.keys():
Expand Down

0 comments on commit 0182fe1

Please sign in to comment.