-
Notifications
You must be signed in to change notification settings - Fork 70
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
First pass mypy typing #387
Conversation
Working on
I tried several approaches with Anyway, I will stop this PR for now as a first step. |
Once #387 is merged, then
I assume passing the installed version will be more CI-friendly? If so then I will add a script to wrap the |
We could just bite the bullet and update our setup process to always install legate/cunumeric properly in the currently active virtual environment, instead of using a custom directory that needs to be passed everywhere. We will need to do this anyway eventually, as the |
I think that would be wonderful but also sounds like a bit of an endeavor. I guess I would not hold up this PR for that, since a wrapper script is a simple solution for the immediate term. |
OK I removed the
I guess we will actually need to find a place to install those typings if we want to avoid referencing the source tree for legate (or maybe that's fine). |
whoops, introduced two minor issues. Should go green now (all tests pass locally eager/gpu/cpu) |
OK it was also easy to add |
Merge conflict is resolved. |
if runtime.args.test_mode: | ||
num_tiles = runtime.num_procs * 2 | ||
return (num_tiles, num_tiles) | ||
else: |
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.
Diff here was simply removing the superfluous else
.
This PR adds begins adding Python types Cunumeric, starting with the following modules
Note the ugly
mypy_path
hack currently inpyproject.toml
:This is because
legate
is not actually installed in thesite-packages
for the Python that is executingmypy
. I think probably the only solution is a dedicated script to invokemypy
and also set the env varMYPY_PATH
from computed values for the legate install. But if anyone has any other ideas, I would love to hear them.