Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Apr 23, 2024
1 parent 3a4ae87 commit 12dfa65
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion torchrl/envs/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,20 @@ def __getattr__(self, attr: str) -> Any:
attr
) # make sure that appropriate exceptions are raised
except AttributeError as err:
if attr.endswith("_spec"):
if attr in (
"action_spec",
"done_spec",
"full_action_spec",
"full_done_spec",
"full_observation_spec",
"full_reward_spec",
"full_state_spec",
"input_spec",
"observation_spec",
"output_spec",
"reward_spec",
"state_spec",
):
raise AttributeError(
f"Could not get {attr} because an internal error was raised. To find what this error "
f"is, call env.transform.transform_<placeholder>_spec(env.base_env.spec)."
Expand Down

0 comments on commit 12dfa65

Please sign in to comment.