Skip to content

Commit

Permalink
Fix Docs Generation (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre authored Oct 15, 2024
1 parent 9e5e15e commit 7c47186
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/_scripts/gen_env_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def trim(docstring):

pattern = re.compile(r"(?<!^)(?=[A-Z])")

gym.logger.set_level(gym.logger.DISABLED)
# gym.logger.set_level(gym.logger.DISABLED)

all_envs = list(gym.envs.registry.values())
filtered_envs_by_type = {}
Expand Down Expand Up @@ -177,12 +177,12 @@ def trim(docstring):
else:
env_table += f"| Observation Space | {env.observation_space} |\n"

if env.reward_space.shape:
env_table += f"| Reward Shape | {env.reward_space.shape} |\n"
if hasattr(env.reward_space, "high"):
env_table += f"| Reward High | {env.reward_space.high} |\n"
if hasattr(env.reward_space, "low"):
env_table += f"| Reward Low | {env.reward_space.low} |\n"
if env.unwrapped.reward_space.shape:
env_table += f"| Reward Shape | {env.unwrapped.reward_space.shape} |\n"
if hasattr(env.unwrapped.reward_space, "high"):
env_table += f"| Reward High | {env.unwrapped.reward_space.high} |\n"
if hasattr(env.unwrapped.reward_space, "low"):
env_table += f"| Reward Low | {env.unwrapped.reward_space.low} |\n"

env_table += f'| Import | `mo_gymnasium.make("{env_spec.id}")` | \n'

Expand Down

0 comments on commit 7c47186

Please sign in to comment.