-
Notifications
You must be signed in to change notification settings - Fork 653
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
Raise an error is parallelizable=True
is passed to the NoJump
transformation
#4259
Comments
I agree, it doesn't make sense to have a static property be settable. I don't think we are currently make use of it but IIRC we had decided that we needed to record if we knew it couldn't work in parallel for the future. (I suppose, the future is @marinegor 's GSOC PR #4162 for parallel analysis — and I am pretty sure that for that one we hadn't thought about having to check for the presence of non-parallelizable transformations). |
yes, I can confirm that I don't check for this. Am I right that it's enough to run this check in if any((t.parallelizable for t in self._trajectory.transformations)):
raise ValueError('Trajectory should not have associated parallelizable transformations') |
That looks correct to me. |
There's probably an automated way to assign that this issue will be fixed by #4162 |
@marinegor you can add "fix #4259" on the description of your PR. |
I changed the description of #4604 since it doesn't actually fix what's described here. I tried to fix it in TODO via just removing |
I agree with the solution in PR #4604 — we don't need to raise an error, we just don't allow passing the useless kwarg in the first place. |
* Fixes #4259 * Remove parallelizable parameter in NoJump transformation (and always set it to False because the transformation is inherently not parallelizable with split-apply-combine) * update CHANGELOG
Expected behavior
There is a comment in the
NoJump
transformation dunder init:mdanalysis/package/MDAnalysis/transformations/nojump.py
Lines 106 to 108 in 8923c4a
I would expect that this should be enforced and I should not be able to set
parallelizable=True
Actual behavior
However it's not enforced:
mdanalysis/package/MDAnalysis/transformations/nojump.py
Line 110 in 8923c4a
and I don't think it's mentioned in the docs. I think it would be good to raise an error if a user sets
parallelizable=True
.A more general solution would be to modify
TransformationBase
to remove theparallelizable
argument. AParallelizableTransformationBase
class could then inherit fromTransformationBase
. This would allow whoever is writing the transformation to decide whether it is parallelizable, and the user calling the transformation could decide whether they want to parallelize it if possible.Code to reproduce the behavior
Current version of MDAnalysis
python -c "import MDAnalysis as mda; print(mda.__version__)"
)python -V
)?The text was updated successfully, but these errors were encountered: