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

[Versioning] Gymnasium 1.0 incompatibility errors #2484

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Oct 10, 2024

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Oct 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2484

Note: Links to docs will display an error until the docs builds have been completed.

❌ 13 New Failures, 5 Unrelated Failures

As of commit a126b0c with merge base efa5745 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

vmoens added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: 8f067bf5a1c023e911e349b4a639118796aa259a
Pull Request resolved: #2484
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2024
changes in the Gym API.
Using gymnasium 1.0 with TorchRL would require significant modifications to your code and may result in:
* Inaccurate step counting, as the auto-reset feature can cause unpredictable numbers of steps to be executed.
* Potential data corruption, as the environment may require/produce garbage data during reset steps.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Potential data corruption, as the environment may require/produce garbage data during reset steps.
* Potential data corruption, as the environment may require/produce invalid data during reset steps.

GYMNASIUM_1_ERROR = """RuntimeError: TorchRL does not support gymnasium 1.0 or later versions due to incompatible
changes in the Gym API.
Using gymnasium 1.0 with TorchRL would require significant modifications to your code and may result in:
* Inaccurate step counting, as the auto-reset feature can cause unpredictable numbers of steps to be executed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Inaccurate step counting, as the auto-reset feature can cause unpredictable numbers of steps to be executed.
* Inaccurate step counting, the number of step calls to obtain the same amount of data using the autoreset feature will depend on the done frequency of the enviornment.

Using gymnasium 1.0 with TorchRL would require significant modifications to your code and may result in:
* Inaccurate step counting, as the auto-reset feature can cause unpredictable numbers of steps to be executed.
* Potential data corruption, as the environment may require/produce garbage data during reset steps.
* Trajectory overlap during data collection.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe explain this one too

* Inaccurate step counting, as the auto-reset feature can cause unpredictable numbers of steps to be executed.
* Potential data corruption, as the environment may require/produce garbage data during reset steps.
* Trajectory overlap during data collection.
* Increased computational overhead, as the library would need to handle the additional complexity of auto-resets.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Increased computational overhead, as the library would need to handle the additional complexity of auto-resets.
* Increased computational overhead, as auto-resets introduce additional computational complexity.

@vmoens vmoens added the versioning Versioning change (version number etc) label Oct 10, 2024
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: 458e9762ec95b008667cce28a23268b77e421042
Pull Request resolved: #2484
@vmoens vmoens merged commit a126b0c into gh/vmoens/33/base Oct 10, 2024
44 of 58 checks passed
vmoens added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: 458e9762ec95b008667cce28a23268b77e421042
Pull Request resolved: #2484
@vmoens vmoens deleted the gh/vmoens/33/head branch October 10, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. versioning Versioning change (version number etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants