From 19af1ddce62881182bf07ba44cd1da9960033be4 Mon Sep 17 00:00:00 2001 From: Tom White Date: Fri, 10 Nov 2023 17:57:15 +0000 Subject: [PATCH] Fix Modal deprecation of `f.call(...)` (#320) * Fix Modal deprecation of `f.call(...)` * Allow redefinition for mypy --- cubed/runtime/executors/modal_async.py | 4 ++-- setup.cfg | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cubed/runtime/executors/modal_async.py b/cubed/runtime/executors/modal_async.py index 5bfb082c..91725336 100644 --- a/cubed/runtime/executors/modal_async.py +++ b/cubed/runtime/executors/modal_async.py @@ -60,7 +60,7 @@ async def map_unordered( def create_futures_func(input, **kwargs): return [ - (i, asyncio.ensure_future(app_function.call.aio(i, **kwargs))) + (i, asyncio.ensure_future(app_function.remote.aio(i, **kwargs))) for i in input ] @@ -68,7 +68,7 @@ def create_futures_func(input, **kwargs): def create_backup_futures_func(input, **kwargs): return [ - (i, asyncio.ensure_future(backup_function.call.aio(i, **kwargs))) + (i, asyncio.ensure_future(backup_function.remote.aio(i, **kwargs))) for i in input ] diff --git a/setup.cfg b/setup.cfg index 23cabf48..6d0e2d68 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,7 @@ ignore = exclude = tests|doc files = . show_error_codes = True +allow_redefinition = True # Most of the numerical computing stack doesn't have type annotations yet. [mypy-apache_beam.*]