Skip to content

Fix dask+atom_slice#54

Merged
dwhswenson merged 2 commits intodwhswenson:masterfrom
sroet:fix_dask
May 29, 2019
Merged

Fix dask+atom_slice#54
dwhswenson merged 2 commits intodwhswenson:masterfrom
sroet:fix_dask

Conversation

@sroet
Copy link
Collaborator

@sroet sroet commented May 22, 2019

Due to an discrepancy between DaskFrequency and it's parent class (ContactMap) __init__() , we tried to convert indices back to unsliced two times:

  • DaskFrequency calls the super.__init__:
  • ContactFrequency.__init__() converts to sliced indices, calls _build_contact_map and converts back to real indices

However DaskFrequency._build_contact_map constructs new ContactFrequency objects and sums them (in unsliced indices), so after this the ContactFrequency.__init__() tries to convert these already correct indices back again.

In order to solve this I moved the conversion from sliced to regular indices as part of the _build_contact_map routine of ContactFrequency.

fixes #51

@dwhswenson
Copy link
Owner

LGTM. Merging. (We might consider dropping/changing the comments on n_workers=4 in tests though, since our current setup is much improved on the thing we're referencing -- the reference probably only serves to create confusion.)

@dwhswenson dwhswenson merged commit 5fac01f into dwhswenson:master May 29, 2019
@dwhswenson dwhswenson added the bug label Jun 3, 2019
@dwhswenson dwhswenson mentioned this pull request Jun 3, 2019
@sroet sroet deleted the fix_dask branch May 10, 2021 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dask example not working

2 participants