-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add the n_protocol_dag_results
property to ProtocolResult
#381
Merged
ianmkenney
merged 12 commits into
OpenFreeEnergy:main
from
ianmkenney:feature/protocolresult_n_protocol_dag_results
Nov 26, 2024
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bab5f38
Added the n_protocol_dag_results property to ProtocolResult
ianmkenney dc48543
Merge remote-tracking branch 'origin/main' into feature/protocolresul…
ianmkenney d97cf22
Modified test and fixed typo
ianmkenney 2aa451f
Added a test for the infinite generator guardrail
ianmkenney ef9c926
Merge branch 'main' into feature/protocolresult_n_protocol_dag_results
IAlibay 3b5ca83
Replaced Optional[int] (default None) with int (default 0)
ianmkenney 1c8bf8c
Added more tests for the ProtocolResult
ianmkenney 32a8d1a
Merge remote-tracking branch 'origin/main' into feature/protocolresul…
ianmkenney 8fe3e24
Refactor ProtocolResult._from_dict
ianmkenney 8d7f3b7
Add test for creating a ProtocolResult from dict with missing data
ianmkenney 3bac74d
Merge remote-tracking branch 'upstream/main' into feature/protocolres…
ianmkenney 6cdbb72
Merge branch 'main' into feature/protocolresult_n_protocol_dag_results
ianmkenney 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
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.
I'm trying to wrap my head around the use case here, could you explain the case where None happens? I.e. at first glance setting None to zero seems incorrect if None means that the gather method did not pass through a value. In that case None means undefined and it's much cleaner than getting 0 with the idea that you got no results (but you do).
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 think in the context of a
Protocol
'sgather
, you'll never see aNone
passed in. I can see instances whereProtocolResult
s are used directly, incorrectly or not, and aNone
would make sense. But of course I immediately throw away theNone
in the code you highlighted above. I suppose there is still some indecision on my part what the right signature should be and which values theProtocolResult
holds on to. I'm tempted to just dropOptional[int]
and useint
with default0
.Just from the tests, I see instances where someone would make a
ProtocolResult
directly and I'll probably do something similar in testing parts ofstratocaster
downstream: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.
Thanks @ianmkenney - is this a time critical thing? I would like to spend a bit of time to check what this means for the existing Protocols, but I don't think I'll have time until Monday :(
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.
Not necessarily. I'll be testing stratocaster strategies based on this branch until it's merged in the hopes that we get some solution that's close in spirit to what we have here.