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

[WIP] Fix RTHP results serialization and test results load #550

Merged
merged 6 commits into from
Sep 14, 2023

Conversation

IAlibay
Copy link
Member

@IAlibay IAlibay commented Sep 9, 2023

Developers certificate of origin

@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Patch coverage: 90.00% and project coverage change: -0.06% ⚠️

Comparison is base (ab271ba) 90.99% compared to head (394f847) 90.93%.
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #550      +/-   ##
==========================================
- Coverage   90.99%   90.93%   -0.06%     
==========================================
  Files         114      117       +3     
  Lines        6882     7163     +281     
==========================================
+ Hits         6262     6514     +252     
- Misses        620      649      +29     
Files Changed Coverage Δ
openfe/tests/conftest.py 100.00% <ø> (ø)
...tests/protocols/test_openmm_equil_rfe_protocols.py 89.06% <41.66%> (-0.25%) ⬇️
openfe/protocols/openmm_rfe/equil_rfe_methods.py 86.46% <45.45%> (-7.07%) ⬇️
...enfe/protocols/openmm_utils/multistate_analysis.py 92.96% <92.96%> (ø)
openfe/analysis/__init__.py 100.00% <100.00%> (ø)
openfe/analysis/plotting.py 100.00% <100.00%> (ø)
openfe/protocols/openmm_rfe/equil_rfe_settings.py 100.00% <100.00%> (ø)
openfe/protocols/openmm_utils/omm_settings.py 84.48% <100.00%> (ø)
openfe/setup/ligand_network_planning.py 100.00% <100.00%> (ø)
openfe/tests/protocols/conftest.py 60.60% <100.00%> (+3.93%) ⬆️
... and 12 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm missing something really obvious. I'm trying to load in the results json back into a RelativeHybridTopologyProtocolResult but my unit results end up without the .outputs attribute.

Current testing looks something like this:

 r = json.load(gzip.open('vac_results.json.gz', 'r'), cls=JSON_HANDLER.decoder)
 rhtpr = RelativeHybridTopologyProtocolResult._from_dict(r['protocol_result']['data'])

Looks like it hasn't sufficiently deserialized the protocol unit results, is this even something we're meant to be able to do?

Loads fine, has the

@richardjgowers
Copy link
Contributor

looks like OpenFreeEnergy/gufe#229 actually needs fixing in gufe, since the specialised ProtocolResult doesn't override to/from dict

@richardjgowers richardjgowers merged commit ba711e9 into main Sep 14, 2023
7 of 9 checks passed
@richardjgowers richardjgowers deleted the test-puresult branch September 14, 2023 16:49
self._equil_iters = self.analyzer.n_equilibration_iterations
self._prod_iters = self.analyzer._equilibration_data[2]
# float conversions to avoid having to deal with numpy dtype serialization
self._equil_iters = float(self.analyzer.n_equilibration_iterations)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these be int instead of float? (Variable name looks to me like an int)

Copy link
Member Author

@IAlibay IAlibay Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already raised that issue in openmmtools, currently they return float and it's been agreed that they will eventually change.

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.

3 participants