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

Changes needed to support execution via alchemiscale-fah #218

Merged
merged 32 commits into from
Jul 15, 2024
Merged

Conversation

dotsdl
Copy link
Member

@dotsdl dotsdl commented Jan 4, 2024

Includes all functionality needed for initial support of alchemiscale-fah, developed here: OpenFreeEnergy/alchemiscale-fah#7

Also closes:

@dotsdl dotsdl changed the title Adjustments to API to accommodate needs in alchemiscale-fah [WIP] Adjustments to API to accommodate needs in alchemiscale-fah Jan 4, 2024
@dotsdl dotsdl changed the title [WIP] Adjustments to API to accommodate needs in alchemiscale-fah [WIP] Changes needed to support execution via alchemiscale-fah Jan 5, 2024
@dotsdl
Copy link
Member Author

dotsdl commented Apr 30, 2024

@ianmkenney can I get a review on this one? I'll keep it [WIP] for now as we finish things out over on OpenFreeEnergy/alchemiscale-fah#7, but getting a review sooner than later here will help us address clear gaps.

@dotsdl dotsdl requested a review from ianmkenney April 30, 2024 15:41
count=count,
protocols=protocols,
)
tasks = self._post_resource("/claim", data)

return [ScopedKey.from_str(t) if t is not None else None for t in tasks]
Copy link
Collaborator

Choose a reason for hiding this comment

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

See the comment on the claim endpoint. t can't be None

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, this is an oversight on my part. Ideally we'd like the API call to always given back a list of length count, even if some elements must be None. This is to mimic the behavior of the older claim_taskhub_tasks method.

I've adjusted the return statement of the compute API claim_tasks endpoint to reflect this.

@@ -187,13 +190,91 @@ def claim_taskhub_tasks(
taskhub=taskhub_scoped_key,
compute_service_id=ComputeServiceID(compute_service_id),
count=count,
protocols=protocols,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that n4js.claim_taskhub_tasks has protocols typed as Protocols, not str.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your fixes in #279!

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ianmkenney ianmkenney left a comment

Choose a reason for hiding this comment

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

@dotsdl added some comments. Do you know what's happening on the latest failed CI?

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 32 lines in your changes missing coverage. Please review.

Project coverage is 80.23%. Comparing base (8d1feb3) to head (2763efc).
Report is 37 commits behind head on main.

Files Patch % Lines
alchemiscale/compute/api.py 23.33% 23 Missing ⚠️
alchemiscale/cli.py 0.00% 2 Missing ⚠️
alchemiscale/compute/client.py 85.71% 2 Missing ⚠️
alchemiscale/compute/service.py 90.00% 2 Missing ⚠️
alchemiscale/storage/statestore.py 71.42% 2 Missing ⚠️
alchemiscale/storage/cypher.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
- Coverage   81.63%   80.23%   -1.40%     
==========================================
  Files          26       27       +1     
  Lines        3371     3451      +80     
==========================================
+ Hits         2752     2769      +17     
- Misses        619      682      +63     

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

dotsdl and others added 6 commits July 9, 2024 08:31
* New protocols: DummyProtocolA, DummyProtocolB, DummyProtocolC
* network_tyk2 now uses a variety of protocols for testing purposes
* Test if Tasks can be claimed by Protocol
* Test if Tasks can be claimed by many Protocols
…-claim

Test TaskHub Task claiming by Protocol
@dotsdl dotsdl changed the title [WIP] Changes needed to support execution via alchemiscale-fah Changes needed to support execution via alchemiscale-fah Jul 15, 2024
@dotsdl dotsdl linked an issue Jul 15, 2024 that may be closed by this pull request
@dotsdl
Copy link
Member Author

dotsdl commented Jul 15, 2024

Thanks so much @ianmkenney! I'm going to merge; any additional changes made to support alchemiscale-fah will come in subsequent PRs.

@dotsdl dotsdl merged commit e1b408b into main Jul 15, 2024
4 checks passed
@dotsdl dotsdl deleted the alchemiscale-fah branch July 15, 2024 06:32
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.

Use pydantic models for encoding SynchronousComputeService settings
3 participants