-
Notifications
You must be signed in to change notification settings - Fork 18
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
Simplify get_builder_from_protocol
in ProjwfcBandsWorkChain
#56
Merged
qiaojunfeng
merged 2 commits into
aiidateam:main
from
t-reents:imp/get_builder_from_protocol
Sep 26, 2024
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @t-reents , thanks for the PR.
These lines should remain. They are used to read the protocol parameters from the file,
projwfcbands.yaml
. For the moment, the file only specifiesclean_workdir
. I think that's why you get identical results even after you remove them. However, more parameters may be added in the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @superstar54
I see the point that one might create a specific protocol for this WorkChain. I also mentioned this in the PR description. My point was that this WorkChain doesn't implement any additional inputs and basically inherits the
PwBandsWorkChain
only. I assumed that one would simply provide the individual changes via the overrides.But yeah, it makes sense to have the possibility to specify a protocol to overwrite the defaults of the parents. Otherwise, one would always need to provide adjusted protocols for
PwBandsWorkChain
andProjwfcBaseWorkChain
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@superstar54 Coming back to the point, that the
ProjwfcBandsWorkChain
doesn't have additional inputs, I'd suggest to load the protocol inputs and merge the relevant parts with the overrides for the subsequent calls ofPwBandsWorkChain
andProjwfcBaseWorkChain
. In this way, we still have the possibility to provide custom protocols but also fix the initial problem that the transformed values get overwritten by the Python base types.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine to me. If you do this, please also remove the
projwfcbands.yaml
file, and then add a detailed comment in the code that the WorkChain uses the parent protocol setting.It would be good that @qiaojunfeng could have a quick look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@superstar54 Do you know if there is any update about this PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually picked this up again this morning. @superstar54 By using the
protocol_inputs
as the overrides in the subsequentget_builder_from_protocols
calls, we now also allow additional inputs in the protocol file.