Skip to content

Conversation

@muellerzr
Copy link
Contributor

What does this PR do?

Adds a check before calling .gather() to make sure that num_items_in_batch actually has a value

Fixes #35076

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.

@Rocketknight1 @SunMarc

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 for the PR ! LGTM !

@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.

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

I give this my Small Enough To Not Require A Real Core Maintainer stamp of approval 🕹️

@ving666
Copy link

ving666 commented Jan 2, 2025

@Rocketknight1 @SunMarc We encountered the same issue. When will this MR be merged? Thank you!

@SunMarc
Copy link
Member

SunMarc commented Jan 2, 2025

I'll let @muellerzr decide either to merge this one or this PR : #35399

@muellerzr muellerzr merged commit a821b9c into main Jan 6, 2025
25 checks passed
@muellerzr muellerzr deleted the muellerzr-num-items-in-batch branch January 6, 2025 15:11
@muellerzr
Copy link
Contributor Author

Thanks! This one got swept under (not good)

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.

Bug of self.accelerator.gather(num_items_in_batch) with enabling average_tokens_across_devices

6 participants