Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Uniform uniform distribute_buffer_sizes for calculating buff size #94
Uniform uniform distribute_buffer_sizes for calculating buff size #94
Changes from 1 commit
8c8bc08
cc23d78
ef48dbf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We require 100% test coverage, and this function is not tested if we moved to here. https://github.com/facebookresearch/optimizers/blob/main/distributed_shampoo/utils/tests/shampoo_utils_test.py is the file you could add your tests.
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.
Then may I add some test module in
shampoo_utils_test.py
for testingdistribute_buffer_sizes
?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.
Yes, because
distribute_buffer_sizes()
is a public function now used for others; as a result, we want to test it.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 for your review. I fixed
buffer_size_rank
, and builded testing module inshampoo_utuls.py
. Could you review it??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.
Codes look good to me, and could you fix the type errors listed in https://github.com/facebookresearch/optimizers/actions/runs/14051552340/job/39345812119?pr=94? You might want to rebase your repo first.
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.
I tested GitHub Actions using
act
. The commander is:act -j mypy -w .github/workflows/type-check.yml
But it failed because
act
failed to find the local path ofuv
. So I added somePATH
for forced configuration intype-check.yml
, and it worked successfully.But I am not certain about this change because:
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.
I see, thanks. This appears to be a compatibility issue with
act
since the workflow does work remotely. I don't knowact
enough to know how to best resolve this, but I think it shouldn't be necessary to explicitly specifyPATH
.The recommended workflow is to use the
make
commands locally before committing, i.e. in this casemake type-check
(this assumes you installed via a variation ofpip install -e ".[dev]"
, see here).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.
In my thought, two tools are useful in the following case:
make
: It is specialized for maintainers (auto-build). (e.g., docker image release)act
: It is specialized for contributors (local test). (e.g., pre-commit, pytes )So I want to carefully suggest this update would be helpful. But as you mentioned,
CONTRIBUTING.md
explicitly requiresmake
, so I would follow your decision.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.
If you want you can create a separate PR to ensure compatibility with
act
by refactoring the workflows since I won't prioritise this anytime soon.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. I will open PR after this. @tsunghsienlee could you approve and merge #96 ? I opened rebased PR for this.