-
Notifications
You must be signed in to change notification settings - Fork 83
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
First steps to make protocols scheduler agnostic #1011
base: main
Are you sure you want to change the base?
Conversation
844efbb
to
142b74c
Compare
It would be great to also add this to the documentation in addition to the docstrings. I noticed that the
Deprecation warnings are ignored by default in Python (https://docs.python.org/3/library/exceptions.html#DeprecationWarning). A user has to enable them manually to see them. I think a |
142b74c
to
e5f1148
Compare
Hi @sphuber ! Sorry for picking this up just now. I added a general description of the Moreover, I realized that the issue of the protocols depending on SLURM also applies to the other workflows, not just the |
538bc59
to
300e4cc
Compare
The current protocols implicitly rely on the `Slurm` scheduler by specifying the number of machines in `metadata.options.resources`. This can cause problems when using different schedulers in combination with `get_builder_from_protocol`. Here, we add this information to the documentation and add a warning that the options need to be explicitly specified in future versions.
In addition to the previous changes to the `pw` `WorkChain`s, this commit adds a warning to all the other `WorkChain`s that provide the `get_builder_from_protcol` method.
This commit adds some general remarks about the `get_builder_from_protocol` methods in the `How to - Workflows` section.
300e4cc
to
3d5bd21
Compare
Thanks @t-reents, sorry for only looking at this PR now. A few preliminary comments, also after reading the corresponding issue:
|
Thanks @mbercx for your comments! I agree that simply removing the To be honest, I don't have a strong opinion on this, so if I understand your comments correctly, we can also directly adjust the protocol files and only add the information to the documentation, without introducing these warnings. |
I think this should be the best way forward, considering that the warnings are sometimes unnecessary, and in case they are, the validation would stop the calculation from running anyways? Maybe I'm missing something though. |
Addresses #1010
The current protocols implicitly rely on the
Slurm
scheduler, thus causing errors when users try to use ad different one, e.g. SGE as described in the issue.Here, the documentation of the
get_builder_from_protocol
method is extended to make the users aware of this behavior. Moreover, a warning is added in case no explicitresources
are provided via theoptions
argument, as this will cause errors in future versions.@sphuber @mbercx Suggestions for a different phrasing or place where to put the additional documentation are very welcome. Moreover, I used a
UserWarning
because aDeprecationWarning
somehow didn't appear. I'm not sure whether they are filtered at some point?