Skip to content

🙅 PPO value_model can't be None, so it shouldn't be Optional #3300

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

Merged
merged 2 commits into from
May 20, 2025

Conversation

AMindToThink
Copy link
Contributor

Simple change to the typing and default value of value_model in PPOTrainer. Since it cannot be None, it should not default to None or be marked Optional. See this issue.

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

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

This looks reasonable, thanks! 🙏

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@qgallouedec
Copy link
Member

@AMindToThink are your latest commits for this PR?

@AMindToThink AMindToThink force-pushed the save-ppo-value-model branch from 36c4c82 to c98ea02 Compare April 15, 2025 21:46
@AMindToThink
Copy link
Contributor Author

Oops, sorry, no. Reverted.

I'm working to allow users to save the value model along with the policy model.

I'm running into some odd errors. I'll make a bug report.

@AMindToThink
Copy link
Contributor Author

Hi @qgallouedec,
It turns out that this issue was already raised a year and a half ago, and you decided to keep the value model Optional with a None default to keep the documentation easier to read. Sorry for rehashing old questions!

I have made an issue with the bugs I ran into while trying to implement saving the value model. I would appreciate your help!

Thank you,
Matthew (@AMindToThink)

@qgallouedec qgallouedec changed the title PPO value_model can't be None, so it shouldn't be Optional 🙅 PPO value_model can't be None, so it shouldn't be Optional May 20, 2025
@qgallouedec qgallouedec merged commit e0dd525 into huggingface:main May 20, 2025
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.

3 participants