migrate delayed unpack_collections#11881
Conversation
There was a problem hiding this comment.
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
dask/delayed.py:109
- The call to finalize_compute() may inadvertently trigger materialization of the collection, potentially impacting performance; consider deferring materialization until it is absolutely necessary.
finalized = expr.finalize_compute().optimize()
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 9 files ± 0 9 suites ±0 3h 18m 20s ⏱️ + 3m 26s Results for commit c268995. ± Comparison against base commit 0fa5e18. This pull request removes 8 and adds 4 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
dask/delayed.py:640
- [nitpick] The _expr slot is added in the slots list of Delayed but is never initialized in init. If this slot is intended for future use, consider adding a comment to explain its purpose or initialize it accordingly.
__slots__ = ("_key", "_dask", "_length", "_layer", "_expr")
|
Looks like this is finally converging. I pulled a thread and everything unravelled... One thing that mildly concerns me is that I can now trigger a key collision of this type #9888 consistently with the |
There was a problem hiding this comment.
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
dask/delayed.py:85
- Consider adding documentation in the function docstring to explain the internal '_return_collections' parameter and its effect on the behavior of this API.
def unpack_collections(expr, _return_collections=True):
dask/_task_spec.py:676
- Ensure that _execute_subgraph is imported or defined within this module; otherwise, the comparison in has_subgraph may raise a NameError at runtime.
def has_subgraph(self) -> bool:
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
31dc6df to
487571a
Compare
Closes #11879
Relates to #11854 as well
This includes two changes
_blockwise_unpack_collections_task_specwhich is a version ofdelayed.unpack_collectionsthat was using theTaskclass already. This was introduced when migrating blockwise to keep the changes small since hybrid tasks can cause problems.