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

Remove assertion in HighLevelGraph constructor #4699

Merged
merged 2 commits into from Apr 15, 2019

Conversation

@mrocklin
Copy link
Member

@mrocklin mrocklin commented Apr 14, 2019

This was not necessary and causes significant slowdowns in
HighLevelGraph construction.

See dask/distributed#2611

  • Tests added / passed
  • Passes flake8 dask
This was not necessary and causes significant slowdowns in
HighLevelGraph construction.

See dask/distributed#2611
@mrocklin
Copy link
Member Author

@mrocklin mrocklin commented Apr 14, 2019

The rest of the time is mostly in the construction of layers and deps in HighLevelGraph.from_collections. We end up recreating the full dict each time. Previously I recall that @jcrist had a clever solution with a list of dicts perhaps? My guess is that at some point that was removed (possibly for ShareDict? probably by me?). I'm surprised that this didn't trigger issues earlier on.

@jcrist
Copy link
Member

@jcrist jcrist commented Apr 14, 2019

Previously I recall that @jcrist had a clever solution with a list of dicts perhaps?

Originally delayed was implemented with a list-of-dicts approach to prevent the merging-on-every-task issue. There's likely a way we can restructure this to bring back that performance (perhaps with a change to HighLevelGraph, or a subclass optimized for delayed objects, idk).

@jcrist
Copy link
Member

@jcrist jcrist commented Apr 15, 2019

LGTM, merging.

@jcrist jcrist merged commit 918854d into dask:master Apr 15, 2019
3 checks passed
@jcrist jcrist deleted the dask.delayed-performance branch Apr 15, 2019
jorge-pessoa pushed a commit to jorge-pessoa/dask that referenced this issue May 14, 2019
* Remove assertion in HighLevelGraph constructor

This was not necessary and causes significant slowdowns in
HighLevelGraph construction.

See dask/distributed#2611

* remove more assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants