Skip to content

Conversation

@astefanutti
Copy link
Contributor

What does this PR do?

This makes sure the BitsAndBytesConfig object gets converted to dict before TrainingArguments are serialized to JSON.

This happens when using BitsAndBytes and the TensorBoard integration for example.

Fixes #37518

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 or the forum? 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, and
    here are tips on formatting docstrings.
  • 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.

@zach-huggingface @SunMarc @MekkCyber

@github-actions
Copy link
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@github-actions github-actions bot marked this pull request as draft April 15, 2025 08:17
@astefanutti astefanutti marked this pull request as ready for review April 15, 2025 08:19
Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

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

Sounds good ! left a very small nit

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

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.

@astefanutti astefanutti force-pushed the fix-bnb-json branch 2 times, most recently from 1fd29a0 to 0ffc789 Compare April 15, 2025 13:54
@MekkCyber MekkCyber merged commit 4541c2c into huggingface:main Apr 16, 2025
18 checks passed
@astefanutti astefanutti deleted the fix-bnb-json branch April 16, 2025 09:34
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 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.

Object of type BitsAndBytesConfig is not JSON serializable error with TensorBoard integration

4 participants