Skip to content

🔧 Use partial for worker_init_fn in GRPO and OnlineDPO trainers to include num_workers and rank, fixes bug https://github.com/huggingface/trl/issues/3544 #3547

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

Conversation

avishaiElmakies
Copy link

What does this PR do?

Fixes #3544
also checked if other trainers have the same issue and found that only online dpo has it. so changed it there as well

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@qgallouedec
Copy link
Member

Thanks! I missed your PR and opened a duplicate: #3568 🤦‍♂️

@avishaiElmakies
Copy link
Author

avishaiElmakies commented Jun 12, 2025

Lol, no problem.
Do you want to close this PR?

@qgallouedec
Copy link
Member

yes, closing as duplicate of #3568

@shirinyamani
Copy link
Member

@avishaiElmakies So sorry I could not review your PR earlier! My focus is on some refactoring stuff these days so I am abit behind for reviews! Sorry abt it!

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.

GRPOTrainer crashs with dataloader_num_workers >= 1
3 participants