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

Adding bulk task creation server side #250

Merged
merged 13 commits into from
Mar 19, 2024
Merged

Adding bulk task creation server side #250

merged 13 commits into from
Mar 19, 2024

Conversation

ianmkenney
Copy link
Collaborator

This PR introduces the create_tasks method to the Neo4jStore. It attempts to minimize the queries made to the database when creating and extending tasks. From local tests, the performance for $n=1$ task created is the same. When creating thousands of tasks, the runtime drops to about one fifth of its previous value (~23 s to 4 s).

The previous `create_task` method wraps around
this new method and preserves previous
functionality.
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 83.56164% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 82.22%. Comparing base (7d80068) to head (0c2920d).

Files Patch % Lines
alchemiscale/interface/api.py 18.18% 9 Missing ⚠️
alchemiscale/storage/statestore.py 94.82% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   82.28%   82.22%   -0.07%     
==========================================
  Files          26       26              
  Lines        3066     3122      +56     
==========================================
+ Hits         2523     2567      +44     
- Misses        543      555      +12     

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

@dotsdl dotsdl self-requested a review February 29, 2024 00:22
@dotsdl
Copy link
Member

dotsdl commented Mar 4, 2024

Is this ready for review @ianmkenney?

@ianmkenney ianmkenney marked this pull request as ready for review March 5, 2024 17:41
@ianmkenney
Copy link
Collaborator Author

@dotsdl ready for review, just had to expand tests

@dotsdl
Copy link
Member

dotsdl commented Mar 13, 2024

Reviewing now! Thanks @ianmkenney!

ianmkenney and others added 2 commits March 13, 2024 17:55
- Added `AlchemiscaleClient.create_bulk_tasks`
- Added `api.create_bulk_tasks`
- Updated `AlchemiscaleClient.create_tasks`
- Added tests for `AlchemiscaleClient.create_bulk_tasks`
Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

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

Looking great @ianmkenney! A few things to hit yet to improve it further, but this is already a big improvement.

alchemiscale/storage/statestore.py Outdated Show resolved Hide resolved
alchemiscale/interface/api.py Show resolved Hide resolved
alchemiscale/interface/client.py Outdated Show resolved Hide resolved
alchemiscale/storage/statestore.py Show resolved Hide resolved
alchemiscale/interface/api.py Outdated Show resolved Hide resolved
ianmkenney and others added 3 commits March 14, 2024 11:22
PEFORMS the same Transformation
- Docstring for `create_transformations_tasks`
- Only report the Tasks ScopedKey in extends
  validation
Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

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

Amazing work @ianmkenney! Feel free to merge if satisfied!

@ianmkenney ianmkenney merged commit 29d0c30 into main Mar 19, 2024
4 checks passed
@ianmkenney ianmkenney deleted the bulk_create_tasks branch March 19, 2024 15:39
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