-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Add valid columns check in _remove_unused_columns method #31466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, overall this feels like a good guard. General comment as I'm unsure if we have unrelated changes in this PR
overall_loss = torch.sum(tokens_per_expert * router_prob_per_expert.unsqueeze(0)) | ||
return overall_loss * num_experts | ||
# Ensure the loss calculation balances each expert's load correctly | ||
overall_loss = torch.sum(tokens_per_expert * router_prob_per_expert) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem like unrelated changes, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ,sorry for that
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. |
@muellerzr many thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
@amyeroberts would you please merge this PR? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What does this PR do?
Add valid columns check in _remove_unused_columns method to fix
huggingface/datasets#6973
huggingface/datasets#6535
This improvement helps users to quickly identify and resolve issues related to column matching between the dataset and the model's forward method.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
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.