-
Notifications
You must be signed in to change notification settings - Fork 651
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
REFACTOR-#4631: Add mypy checks for modin.distributed #5109
Conversation
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
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.
@rosdyana thank you so much for making this PR. I have left some suggestions inline.
There will likely be some errors once you accept my suggestion to edit the mypy.ini file so it includes modin/distributed/dataframe/pandas/partitions.py
. Please try to address them and check your work locally by running mypy --config-file mypy.ini modin/distributed
. If you have any questions or you get stock, please comment here.
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
@rosdyana in order to pass the commit lint, you will have to amend your first commit so that it says something like, "FIX-#4631: Add mypy checks for modin.distributed." You should be able to amend your first commit with:
|
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
@rosdyana it looks like you've added commit e904736 with the correct formatting, but your first commit still has the incorrect formatting. Your commits as they are will still fail the CI. Could you please try rewording your first commit? Meanwhile, I'll respond to the open inline comments. Please ping this thread if I haven't responded within 24 hours from now. |
@rosdyana just FYI, next time you want to accept someone's suggestion on a GitHub PR, I highly recommend using the "commit suggestion" if you want to accept one suggestion, or the "add suggestion to batch" button if you have multiple suggestions. That usually reduces the amount of work you have to do and makes it easier for everyone to track what's happening with the PR. |
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
I tried to amend that commit, but it doesn't work, I have no idea. Do you mind if I re-create the PR? |
@rosdyana what's the error that you got? Did you try to "reword" the first commit and "squash" or "pick" the other commits? Rebasing can be hard, but it's better for history keeping and easier for everyone involved with the PR if we can keep all the comment history in a single PR. |
Yes, I did "reword" for the first commit, and then choose "pick" for the other commits. Should I "squash" the other commits? |
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.
@rosdyana I left some more comments. Please respond here or in the comment threads if you have any questions or concerns. Also, please be sure to run mypy --config-file=mypy.ini modin/distributed/
locally from the modin root to check whether mypy is passing. If it fails and you can't fix the failures, just say so here and we'll try to come to a resolution.
Once again, there's no need to rebase or amend your first commit.
Using Axes instead of List for index and columns Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Hi @mvashishtha the mypy returns this error
Should we ignore it? or we need to solve it? |
Codecov Report
@@ Coverage Diff @@
## master #5109 +/- ##
===========================================
- Coverage 84.56% 56.50% -28.06%
===========================================
Files 256 256
Lines 19347 18709 -638
===========================================
- Hits 16361 10572 -5789
- Misses 2986 8137 +5151
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@rosdyana I think we need some more mypy annotations before we can convince mypy that all those classes are not |
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
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.
@rosdyana could you rebase on the latest master? There were some changes that broke CI earlier but it should be fixed now.
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
Hey, @mvashishtha @pyrito let me know if I need to change anything else. Thanks! |
@rosdyana please take a look at CI failure here: https://github.com/modin-project/modin/actions/runs/3289605374/jobs/5432602430 Maybe we should define that Union under if TYPE_CHECKING:
from modin.core.execution.ray.implementations.pandas_on_ray.partitioning import (
PandasOnRayDataframePartition,
)
from modin.core.execution.dask.implementations.pandas_on_dask.partitioning.partition import (
PandasOnDaskDataframePartition,
)
PartitionUnionType = Union[PandasOnRayDataframePartition, PandasOnDaskDataframePartition]
else:
from typing import Any
PartitionUnionType = Any
# skip many lines of code
def _unwrap_partitions() -> list:
[p.drain_call_queue() for p in modin_frame._partitions.flatten()]
def get_block(partition: PartitionUnionType) -> np.ndarray: (untested) |
Signed-off-by: Rosdyana Kusuma <rosdyana.kusuma@gmail.com>
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, thanks a lot @rosdyana!
Thanks for your contributions here @rosdyana !! |
+1 @rosdyana thank you for your contribution. Please continue reach out on GitHub, slack, or discuss, if you would like to contribute more. |
Signed-off-by: Rosdyana Kusuma rosdyana.kusuma@gmail.com
What do these changes do?
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date