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

Small bugfix for async prefect functions #2462

Merged

Conversation

zulissimeta
Copy link
Contributor

Summary of Changes

This provides a small bug fix for the recent patch to how prefect flows are handled. The prior methods only worked for sync flows.

Requirements

Note: If you are an external contributor, you will see a comment from @buildbot-princeton. This is solely for the maintainers.

@buildbot-princeton
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

Attention: Patch coverage is 48.21429% with 29 lines in your changes missing coverage. Please review.

Project coverage is 97.41%. Comparing base (85615ef) to head (92bb506).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/quacc/wflow_tools/prefect_utils.py 38.23% 21 Missing ⚠️
src/quacc/wflow_tools/decorators.py 61.90% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2462      +/-   ##
==========================================
- Coverage   98.38%   97.41%   -0.98%     
==========================================
  Files          85       85              
  Lines        3478     3518      +40     
==========================================
+ Hits         3422     3427       +5     
- Misses         56       91      +35     

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

@Andrew-S-Rosen
Copy link
Member

@zulissimeta: Thank you! I have never used async flows.

Before merging, two questions:

  1. Do we also need this for subflows, or no?
  2. Would it be possible to add a minimal async test? I would like to ensure that upstream changes to Prefect do not break how we are handling our flows.

@zulissimeta
Copy link
Contributor Author

@zulissimeta: Thank you! I have never used async flows.

Before merging, two questions:

  1. Do we also need this for subflows, or no?
  2. Would it be possible to add a minimal async test? I would like to ensure that upstream changes to Prefect do not break how we are handling our flows.

@Andrew-S-Rosen Good suggestion! Updated with some tests, and caught another bug.

@zulissimeta zulissimeta marked this pull request as draft September 15, 2024 17:56
@zulissimeta zulissimeta marked this pull request as ready for review September 16, 2024 13:53
@Andrew-S-Rosen
Copy link
Member

@zulissimeta: Thank you again for this PR! I am mostly going to take this on faith since I'm not too familiar with the async work. However, it would be really helpful if we could increase the coverage on this PR. Would this be possible? Retaining the high code coverage of the repo is extremely helpful for me in maintaining this package.

@Andrew-S-Rosen
Copy link
Member

Thank you, @zulissimeta! Merging but opening an issue to record the need to move things upstream: #2473

@Andrew-S-Rosen Andrew-S-Rosen merged commit c39345b into Quantum-Accelerators:main Sep 19, 2024
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants