-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement Connectivity Strategy
#1
Open
ianmkenney
wants to merge
12
commits into
main
Choose a base branch
from
feature/connectivity_strategy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Initial implementation of _propose, using the mean connectivity of the edges' (transformations) nodes as unnormalized weights. The weights have yet to be normalized and the tests are just checking that the means are correct.
In order to preserve unnormalized weights, which might be useful for debugging/have a more intuitive meaning, the StrategyResult now holds onto these values directly and normalization is handled by calling the new `StrategyResult.resolve` method.
* Strategy initialization now checks that the settings provided to the constructor are the correct type specified by the _settings_cls class attribute of any Strategy subclass. This has the effect that a Strategy author must explicitly specify what settings they are will to accept. This deviates slightly from the gufe Protocol class, which doesn't perform such a check. Tests were added to `test_strategy_abstraction.py` showing only specified StrategySettings will be allowed. * Added TypeVar for ProtocolResults in the `Strategy` base class. Any downstream use of the `propose` method will then check that it's being fed a dictionary with subclasses of ProtocolResults. I don't believe there is an easier way to do this since the ProtocolResult is embedded in a dictionary. * gufe doesn't work with pydantic v2, so I now use the pydantic v1 api. * The match statement for capturing the max_runs / cutoff settings was updated and properly catches which of these were set to None
* Provide a variety of parameters to ConnectivityStrategySettings Termination logic within _propose depends on the combination of parameters given to ConnectivityStrategySettings. A preset batch of valid settings are provided through SETTINGS_VALID. * Test ConnectivityStrategySettings validators Add a test for sets of ConnectivityStrategySettings including both valid and invalid settings. If an Exception is expected, check that it is raised, otherwise check that the settings could be instantiated. * Simulate the ConnectivityStrategy Test that the ConnectivityStrategy terminates after a set number of iterations. The max number of iterations is set to 100. * Remove abstract method bodies from coverage reports
Add a test for ConnectivityStrategy demonstrating deterministc proposals. Given random ProtocolResults, show that StrategyResults are the same after multiple runs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.