diff --git a/fiftyone/operators/executor.py b/fiftyone/operators/executor.py index 1d0deb0c61..251e05987c 100644 --- a/fiftyone/operators/executor.py +++ b/fiftyone/operators/executor.py @@ -6,6 +6,7 @@ | """ import asyncio +import inspect import traceback import types as python_types @@ -199,7 +200,7 @@ async def execute_or_delegate_operator(operator_uri, request_params): try: raw_result = await ( operator.execute(ctx) - if asyncio.iscoroutinefunction(operator.execute) + if inspect.isawaitable(operator.execute) else fou.run_sync_task(operator.execute, ctx) )