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

[Examples] Adding a tensordict and TorchRL version of the PyTorch example #2010

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

whatdhack
Copy link

Description

Adding a torchdict and torch rl version of the PyTorch example reinforcement_q_learning.py

Motivation and Context

Adds a simpler DQN example

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of examples)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • [ X] I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

Copy link

pytorch-bot bot commented Mar 13, 2024

🔗 Helpful Links

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

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

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

@facebook-github-bot
Copy link

Hi @whatdhack!

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!

@vmoens vmoens changed the title Adding a torchdict and torch rl version of the PyTorch example. [Documentation] Adding a tensordict and TorchRL version of the PyTorch example. Mar 13, 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 [Documentation] Adding a tensordict and TorchRL version of the PyTorch example. [Documentation] Adding a tensordict and TorchRL version of the PyTorch example Mar 13, 2024
@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 Mar 13, 2024
@vmoens vmoens added the documentation Improvements or additions to documentation label Mar 13, 2024
@whatdhack
Copy link
Author

@vmoens , FYI this PR is for working code, not documentation.

@vmoens
Copy link
Contributor

vmoens commented Mar 14, 2024

@vmoens , FYI this PR is for working code, not documentation.

Sure, I agree it's not plain "doc". Examples are part of the doc in some sense. We use them to show how to use the lib, but they're not core features.
For instance we can deprecate an exxample or modify it internally without telling users before.

@vmoens vmoens changed the title [Documentation] Adding a tensordict and TorchRL version of the PyTorch example [Examples] Adding a tensordict and TorchRL version of the PyTorch example Mar 14, 2024
@vmoens
Copy link
Contributor

vmoens commented Mar 14, 2024

Since this was a tutorial on pytorch/tutorials shouldn't it be a tutorial here too?
Also what about changing the tutorial over there directly and incorporate pieces from torchrl in it (like replay buffer etc)?

@whatdhack
Copy link
Author

@vmoens , I can create a PR there too if you think that has a good likelihood of going through .

@vmoens
Copy link
Contributor

vmoens commented Mar 15, 2024

cc @svekars do you think adapting the reinforce_q_learning is advisable?

My understanding is that @whatdhack wishes something lightweight, not heavily focuses on torchrl but more on how to leverage the few low-level tools we have to reduce the boilerplate in the tutorial

@whatdhack
Copy link
Author

A simple DQN example would be beneficial to someone getting started, given that DQN's are probably the very first DL RL one gets introduced to.

@vmoens
Copy link
Contributor

vmoens commented Mar 20, 2024

I think the way to go here would be to make a PR in PyTorch tutorials instead, does that sound alright to you?

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 Examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants