Skip to content
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

Consistent use of ordering by task name #3271

Merged
merged 6 commits into from Mar 19, 2018

Conversation

mrocklin
Copy link
Member

@mrocklin mrocklin commented Mar 11, 2018

dask

We break ties in task ordering by using the task key itself. Previously we did this inconsistently due to using sorted(reverse=True/False) in different situations. This cause inconsistent ordrering in general and pathological ordering in some situations (like nearest neighbor computations).

We now use two different comparators for string comparison.

  • Tests added / passed
  • Passes flake8 dask
  • Fully documented, including docs/source/changelog.rst for all changes
    and one of the docs/source/*-api.rst files for new API

@mrocklin
Copy link
Member Author

It also looks like we need to drop the initial call to sorted on root nodes. pangeo-data/pangeo#150 (comment)

@mrocklin mrocklin changed the title Add failing test for nearest-neighbor scheduling Consistent use of ordering by task name Mar 18, 2018
@mrocklin
Copy link
Member Author

Merging this soon if there are no comments

Copy link
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -238,8 +240,11 @@ def test_gh_3055():

dsk = dict(w.__dask_graph__())
o = order(dsk)
# from dask import visualize
# visualize(dsk, color='order', filename='dask.pdf', node_attr={'penwidth': '6'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants