Skip to content
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
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ianmkenney
Copy link
Member

No description provided.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant