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

BCOTrainer version upgrade fixes #2867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

claralp
Copy link
Contributor

@claralp claralp commented Feb 15, 2025

What does this PR do?

This PR fixes to some issues that I identified with the BCOTrainer on the latest version upgrade:

  • remove extra shuffles, super class already handles data shuffling. These destroy training reproducibility
  • fix serialization of UDM classifier, not all parameters were saved previously
  • accelerate.gather not hanging on empty lists anymore
  • convert delta to tensor before logsigmoid, this led to numeric errors
  • do not update delta value in eval mode

Let me know if you have any questions

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? Here are the
    documentation guidelines. - changes do not affect docs
  • Did you write any new necessary tests? - tests exist already

Who can review?

@kashif @qgallouedec

- fix serialization of UDM classifier
- accelerate.gather not hanging on empty lists anymore
- convert delta to tensor before logsigmoid
- do not update delta value in eval mode
@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.

@kashif
Copy link
Collaborator

kashif commented Feb 16, 2025

@claralp we will need to add joblib as a dependency?

@claralp
Copy link
Contributor Author

claralp commented Feb 17, 2025

@kashif yes, but could use pickle as alternative if you prefer. Just BCO with UDM needs this

@PhilipMay
Copy link
Contributor

Well, IMO using joblib is a good idea because it supports pickle with compression with just a line of code. So complexity is reduced. But it can also be a good idea to reduce the number of external dependencies. On the other side joblib is a very common dependency.

So @kashif should decide this. What do you think?

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.

4 participants