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

'MDAnalysis.analysis.align' parallelization #4738

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

talagayev
Copy link
Member

@talagayev talagayev commented Oct 18, 2024

Fixes #4659 attempt

Changes made in this Pull Request:

  • added backends and aggregators to AlignTraj and AverageStructure in analysis.align.
  • added the client_AlignTraj and client_AverageStructure in conftest.py
  • added client_AlignTraj and client_AverageStructure in run() in test_align.py

Currently for AlignTraj it only accepts serial and dask with multiprocessing leading to the pytests taking forever. An additional error that appears is the following:

OSError: File opened in mode: self.mode. Reading only allow in mode "r"

For AverageStructure the Failure that appears is the following:

AttributeError: 'numpy.ndarray' object has no attribute 'load_new'

Which leads me to believe that AverageStructure can not be parallelized, but I would need additional opinions on it and on AlignTraj :)

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4738.org.readthedocs.build/en/4738/

added backends and aggregators for AverageStructure
added AverageStructure to conftest
added client_AverageStructure
added for AlignTraj backends and aggregator
added client_AlignTraj
added client_AlignTraj to tests
@pep8speaks
Copy link

pep8speaks commented Oct 18, 2024

Hello @talagayev! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 310:80: E501 line too long (86 > 79 characters)
Line 327:80: E501 line too long (87 > 79 characters)
Line 333:80: E501 line too long (97 > 79 characters)
Line 357:80: E501 line too long (85 > 79 characters)
Line 377:80: E501 line too long (91 > 79 characters)

Comment last updated at 2025-01-11 21:40:18 UTC

PEP fixes
adjusted position of inputs
fix positional arguments
added multiprocessing to test
removed multiprocessing from AlignTraj
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.40%. Comparing base (bdfb2c9) to head (c37add2).

Files with missing lines Patch % Lines
package/MDAnalysis/analysis/align.py 93.33% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (bdfb2c9) and HEAD (c37add2). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (bdfb2c9) HEAD (c37add2)
7 5
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4738      +/-   ##
===========================================
- Coverage    93.66%   86.40%   -7.26%     
===========================================
  Files          177      189      +12     
  Lines        21795    22874    +1079     
  Branches      3067     3068       +1     
===========================================
- Hits         20414    19765     -649     
- Misses         929     2670    +1741     
+ Partials       452      439      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

check possible fix
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.

MDAnalysis.analysis.align Implement parallelization or mark as unparallelizable
2 participants