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

[Doc] Indicate necessary context to run multiprocessed collectors in doc #2126

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

GJBoth
Copy link
Contributor

@GJBoth GJBoth commented Apr 26, 2024

This PR updates the docstrings for the MultiSyncCollector and `MultiaSyncCollector. It does several things:

  • Add a note that code should be run inside a if __name__ == "__main__": block.
  • Updated the examples and fixes some errors, including:
    • The gymenv already has a stepcounter, so removed it.
    • devices and storing_devices kwargs don't exist - it needs to be device and storing_device.
    • Added cat_results="stack" to follow future behaviour.
  • The collector wasn't actually imported in the example, so I added that too - it's now self-contained.
  • The current main branch also does not pass pre-commit, which is why tensor_specs.py is changed too.

I'm currently building the docs to see if everything looks good, but it's taking very long. Any advice there?

Copy link

pytorch-bot bot commented Apr 26, 2024

🔗 Helpful Links

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

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

❌ 4 New Failures, 6 Unrelated Failures

As of commit d425c25 with merge base 3c6b9c6 (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.

@facebook-github-bot
Copy link

Hi @GJBoth!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@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 Apr 26, 2024
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@vmoens vmoens changed the title Update MultiCollector docs. [Doc] Indicate necessary context to run multiprocessed collectors in doc Apr 29, 2024
@vmoens vmoens added the documentation Improvements or additions to documentation label Apr 29, 2024
@GJBoth
Copy link
Contributor Author

GJBoth commented Apr 29, 2024

@vmoens Could you help out here with the failed tests? Some of them failed due to main failing, and I didn't even touch code - just added docs -, so not sure why the CI on benchmarks is failing?

@vmoens
Copy link
Contributor

vmoens commented Apr 29, 2024

Yeah those are broken tests on CUDA, I will handle that separately :)

Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

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

Thanks! A couple of formatting issues but we should be good to go after that!

torchrl/collectors/collectors.py Outdated Show resolved Hide resolved
torchrl/collectors/collectors.py Outdated Show resolved Hide resolved
torchrl/collectors/collectors.py Outdated Show resolved Hide resolved
@GJBoth
Copy link
Contributor Author

GJBoth commented Apr 29, 2024

Just resolved the issues!

Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

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

LGTM

@vmoens vmoens merged commit 741947a into pytorch:main Apr 30, 2024
48 of 58 checks passed
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. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants