-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix setuptools config #39
Conversation
Hi @francois-rozet! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Thanks for adjusting the tests! I didn't include the mypy type checking because it will detect a duplicate module in Not sure what happened to the GPU tests though. |
My bad, I'll revert.
Not sure either :/ I did not change anything else in the codebase, so it seems weird that it would fail? Can you launch the tests on the master branch? |
Note that the "profiler function will be ignored" error is also present in the main branch, but not the segmentation fault. |
Yes, the issue seems unrelated to that. I just reran the test on |
I am reruning the GPU tests now in CI, let's see how it works. This should not affect GPU tests. |
It seems dropping the |
Agreed. But we should check if this issue also occurs outside of the GitHub runner, i.e. if installing without |
Let's go for that (but keep in mind that this bug should be investigated). I am away from my laptop, but if you make a code suggestion (in a review comment) I can merge it from my phone. |
BTW, I don't think |
Co-authored-by: Runa Eschenhagen <[email protected]>
py-modules = [ | ||
"matrix_functions", | ||
"matrix_functions_types", | ||
"optimizer_modules", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["distributed_shampoo*"] |
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 think we want to do this instead, to avoid packaging the tests and examples:
include = ["distributed_shampoo*"] | |
exclude = ["*tests", "*examples"] |
But I'm not sure how this could be related to the failing GPU 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.
Unfortunately, this does not work. First, without include
, setuptools
will install too much things (build/lib
). Second, exclude
seems to have no effect.
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. Not sure why exclude
has no effect though? Do you know how we can exclude *tests
and *examples
?
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.
There seems to be a lot of long lasting issues and confusion regarding exclude
... (e.g. pypa/setuptools#3346, pypa/setuptools#3260). I would say, the easiest is likely to move these test directories outside of the module (they should not be there anyway).
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.
Agreed, that makes sense to me. Thanks a lot for your fix and help with debugging!
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 wonder this might be caused by how the wildcard matching works in setuptools
work. Personally I am not super familiar with this but if we really want to verify this, I might setup something super small to verify this.
@tsunghsienlee has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks @francois-rozet and @runame , let's merge this for now to unblock others. |
@tsunghsienlee merged this pull request in 8a3feef. |
Summary: Follow-up to #39. This removes all `examples` and `tests` folders from the wheel, but keeps them in the sdist (by adding a `MANIFEST.in` file). Pull Request resolved: #42 Reviewed By: anana10c Differential Revision: D65766841 Pulled By: tsunghsienlee fbshipit-source-id: 1bdcfad566df5ca7170e948d3193126f69fba619
Closes #38.
The issue is that
setuptools
is not allowed to search for sub-modules (notablyutils
) with the current configuration. Using package discovery solves this issue.