Skip to content

Commit

Permalink
Fix Modal deprecation of f.call(...) (#320)
Browse files Browse the repository at this point in the history
* Fix Modal deprecation of `f.call(...)`

* Allow redefinition for mypy
  • Loading branch information
tomwhite authored Nov 10, 2023
1 parent 339b5a0 commit 19af1dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cubed/runtime/executors/modal_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ 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
]

backup_function = backup_function or app_function

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
]

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.*]
Expand Down

0 comments on commit 19af1dd

Please sign in to comment.