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

Fix Prefect #2605

Merged
merged 2 commits into from
Jan 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/quacc/wflow_tools/prefect_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING, Any

from prefect.futures import PrefectFuture
from prefect.results import BaseResult, ResultRecord
from prefect.results import ResultRecord
from prefect.utilities.annotations import quote
from prefect.utilities.collections import StopVisiting, visit_collection
from typing_extensions import TypeVar
Expand Down Expand Up @@ -56,9 +56,7 @@ def _collect_futures(futures, expr, context):
future.wait()
if future.state.is_completed():
result = future.state.result()
if isinstance(result, BaseResult):
result = result.get()
elif isinstance(result, ResultRecord):
if isinstance(result, ResultRecord):
result = result.result
results.append(result)
else:
Expand Down Expand Up @@ -121,9 +119,7 @@ def _collect_futures(futures, expr, context):
future.wait()
if future.state.is_completed():
result = future.state.result()
if isinstance(result, BaseResult):
result = result.get()
elif isinstance(result, ResultRecord):
if isinstance(result, ResultRecord):
result = result.result
results.append(result)
else:
Expand Down
Loading