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

[Minor] Fix runnability of RLHF example in examples/rlhf #1753

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

ianbarber
Copy link
Contributor

Description

Small amount of bit rot on the RLHF example.

  • Correct passing of configuration in train transformer and reward steps
  • Fix typo on prompt logger
  • Update log_scalar to match class spec.

Motivation and Context

There was one larger issue which I didn't address, which was that tensordictmodule wasn't playing well with dynamo, due to the optimizedmodule not forwarding getattr calls to the underlying module: I didn't get round to verifying that was fixed in nightlies (though I think it might be), but I did think about about updating the train/train_reward configs to default compile to be off as it will fail in the stable release version with TypeError: _forward_unimplemented() got an unexpected keyword argument 'input_ids' or similar. Its easy enough to disable compile in config or on command line, but it might be worth disabling in the base config as well.

Types of changes

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

  • [ x] 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.

- Correct passing of configuration in train transformer and reward steps
- Fix typo on prompt logger
- Update log_scalar to match class spec.
Copy link

pytorch-bot bot commented Dec 19, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (10 Unrelated Failures)

As of commit 097db8a with merge base 0e02132 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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 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 Dec 19, 2023
@vmoens
Copy link
Contributor

vmoens commented Dec 19, 2023

which was that tensordictmodule wasn't playing well with dynamo, due to the optimizedmodule not forwarding getattr calls to the underlying module

Yep! tensordict (and related modules) compatibility with dynamo and the rest of the compile stack is a big TODO. Happy to chap about what the roadmap for this looks like offline.

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
Our examples CI should have caught these...

@vmoens vmoens added the bug Something isn't working label Dec 19, 2023
@vmoens vmoens merged commit 2e1d60c into pytorch:main Dec 19, 2023
53 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants