-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 DaskRunner GBK by bumping dask
lower bound
#29802
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.
Please also add a unit test to the dask runner test suite that reproduces the original issue.
We should also add a precommit/postcommit that runs the dask runner tests (but that could be a separate task).
sdks/python/setup.py
Outdated
# a lower bound release of `distributed`, once a release that includes the linked PR is available. | ||
# 'dask >= 2023.XX', | ||
# 'distributed >= 2023.XX', | ||
'distributed @ git+https://github.com/dask/distributed.git@8c3eb6f0bf47d124c887c543599d80ff09c3f5ed', |
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.
When you do update this we should consider adding an upper bound to protect against breaking changes (e.g. I was seeing failures because wait_for_workers(n_workers)
became a required parameter).
Unfortunately dask's use of CalVer isn't particularly conducive to this, as the third number is just a unique id for a release in that month (e.g. 2023.12.1
might be a bugfix release on 2023.12.0
or it could be the second major release in December). I think we should just restrict on the month, even though this might technically let a breaking change in. So something like >=2023.12,<2024.1
.
Thank you for working to resolve this :) |
The good newsThe main objective of fixing GBK appears to be solved, as shown by the fact that this script # gbk.py
import apache_beam as beam
from apache_beam.runners.dask.dask_runner import DaskRunner
if __name__ == "__main__":
with beam.Pipeline(runner=DaskRunner()) as p:
p | beam.Create([('a', 1), ('a', 2), ('b', 3), ('b', 4)]) | beam.GroupByKey() | beam.Map(print) gives a correctly grouped result when when with $ python gbk.py
('b', [3, 4])
('a', [1, 2]) and (as expected) an incorrect result with the latest release of $ python gbk.py
('a', [1])
('b', [3])
('b', [4])
('a', [2]) The bad newsWe can't actually test this, because while the linked This is because
So it seems like the only viable path forward is to revisit a fix for dask/dask#6723, which I was hoping we could avoid. I will re-ping that issue either later today or tomorrow with some thoughts on a path forward. |
See dask/dask#6723 (comment) and dask/dask#10734. AFAICT, the latter resolves the testing issues observed above. |
distributed
lower bounddask
lower bound
I've renamed the issue to reflect my current proposed path forward, which it turns out is a PR to dask (not distributed). This PR appears to fix non-deterministic hashing of both strings and
👍
Agreed! IIUC, this is what is being tracked in #25696? |
Ah yes, thanks. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
Fixes #29365 by bumping
distributed
dask
to include upstream fix indask/distributed#8400dask/dask#10734.Opening as draft until we get a release of
distributed
dask
.cc @jacobtomlinson @TheNeuralBit for visibility 🚀
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.