Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save _horizon during setup #129

Merged
merged 3 commits into from
Jan 12, 2024
Merged

save _horizon during setup #129

merged 3 commits into from
Jan 12, 2024

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Jan 10, 2024

@vikashplus vikashplus changed the base branch from main to dev January 10, 2024 21:06
@@ -136,6 +136,9 @@ def _setup(self,
assert not done, "Check initialization. Simulation starts in a done state."
self.observation_space = gym.spaces.Box(obs_range[0]*np.ones(observation.size), obs_range[1]*np.ones(observation.size), dtype=np.float32)

# we copy the horizon to avoid having gymnasium hijacking it later
self._horizon = self.spec.max_episode_steps
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.spec is none at this point.

@vmoens
Copy link
Contributor Author

vmoens commented Jan 11, 2024

@vikashplus hopefully this should work, or at least a version of that with implement_for if gym.registry syntax changes from release to release

@vmoens
Copy link
Contributor Author

vmoens commented Jan 11, 2024

The checks are passing but better check on your end if it's all ok :)

Copy link
Owner

@vikashplus vikashplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping with this.

LGTM

@vikashplus vikashplus merged commit bc994ef into vikashplus:dev Jan 12, 2024
1 check passed
@vmoens vmoens deleted the patch-2 branch January 12, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants