-
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
Merged
Merged
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.
Since features in the planned gufev1.2.0 release are needed by stratocaster, we need to accurately recreate an environment that gufe will provide upon installation. By using a submodule, we can install the base testing environment from the gufe environment.yml file. This will be reverted once gufev1.2.0 is available on conda-forge. This also makes it easier to react to last minute changes to gufe prior to its v1.2.0 release.
@ianmkenney I'd say go ahead and merge. We'll make changes via other PRs going beyond this. Great work! |
The data structures returned by gufe fixtures have use outside of the package testing (think example systems in docs). I've extracted the network fixture so it is returned by a regular function in the stratocaster.tests.networks module.
gufe v1.2.0 is available on conda-forge, no longer need the submodule for testing. pydantic imports now match the style used in gufe to address version issue.
ianmkenney
force-pushed
the
feature/connectivity_strategy
branch
from
January 14, 2025 16:17
0411e3c
to
98ebdc1
Compare
ianmkenney
force-pushed
the
feature/connectivity_strategy
branch
from
January 14, 2025 16:18
98ebdc1
to
26a2314
Compare
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.