Skip to content

[Docs] Add Section on Expectations to Graph Page#5764

Merged
mrocklin merged 8 commits intodask:masterfrom
devin-petersohn:issues/distributed#3350
Jan 6, 2020
Merged

[Docs] Add Section on Expectations to Graph Page#5764
mrocklin merged 8 commits intodask:masterfrom
devin-petersohn:issues/distributed#3350

Conversation

@devin-petersohn
Copy link
Copy Markdown
Contributor

cc @mrocklin

  • Tests added / passed
  • Passes black dask / flake8 dask

* Resolves dask/distributed#3350
* Adds a section in the documentation that discusses how Futures are handled when tasks operate on them `in-place`
Copy link
Copy Markdown
Member

@mrocklin mrocklin left a comment

Choose a reason for hiding this comment

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

Thanks @devin-petersohn ! I left a few bits of micro-feedback. I was a little more verbose than usual, just because I'm hoping to see you around these parts again :) Hope that's alright.

Copy link
Copy Markdown
Member

@mrocklin mrocklin left a comment

Choose a reason for hiding this comment

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

Thanks @devin-petersohn ! A few more small comments. It looks like we're converging though.

When a task is submitted to Dask for execution, there are a number of assumptions
that are made about that task. In general, tasks with side-effects that alter the
state of a future in-place are not recommended. Values stored by Dask are mutable,
and can be updated in-place. For example, consider a workflow involving a
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On second thought the sentence

Values stored by dask are mutable and can be updated in place

might be interpretted as

it is permissible to update data in place

raher than

nothing stops you from shooting yourself in the foot

Maybe instead of this sentence we say "Modifying data stored in Dask can have unintended consequences".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree. I think there are probably cases where the behavior is non-deterministic or introduces race conditions, so maybe we should add that it's not officially a supported functionality, or explicitly mention the race condition possibility.

devin-petersohn and others added 2 commits January 4, 2020 18:24
Co-Authored-By: Matthew Rocklin <mrocklin@gmail.com>
@devin-petersohn
Copy link
Copy Markdown
Contributor Author

Thanks @mrocklin, I'm happy to keep updating as necessary.

@mrocklin mrocklin merged commit 60d9ae5 into dask:master Jan 6, 2020
@mrocklin
Copy link
Copy Markdown
Member

mrocklin commented Jan 6, 2020

Merging this in. Thanks @devin-petersohn !

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.

Document Futures mutability of underlying data

2 participants