Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
toro-berlin committed Feb 13, 2023
1 parent efd8bbb commit 8c565c7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions prefect_ray/task_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ async def submit(
)

def _exchange_prefect_for_ray_futures(self, kwargs_prefect_futures):
"""
Exchanges Prefect futures for Ray futures.
"""
"""Exchanges Prefect futures for Ray futures."""

def exchange_prefect_for_ray_future(expr):
"""Exchanges Prefect future for Ray future."""
if isinstance(expr, PrefectFuture):
ray_future = self._ray_refs.get(expr.key)
if ray_future is not None:
Expand All @@ -180,11 +179,10 @@ def exchange_prefect_for_ray_future(expr):

@staticmethod
def _run_prefect_task(func, *args, **kwargs):
"""
Resolves Ray futures before calling the actual Prefect task function.
"""
"""Resolves Ray futures before calling the actual Prefect task function."""

def resolve_ray_future(expr):
"""Resolves Ray future."""
if isinstance(expr, ray.ObjectRef):
return ray.get(expr)
return expr
Expand Down

0 comments on commit 8c565c7

Please sign in to comment.