diff --git a/modal/__init__.py b/modal/__init__.py index f0a157401..bdfa29ac3 100644 --- a/modal/__init__.py +++ b/modal/__init__.py @@ -18,7 +18,7 @@ from .dict import Dict from .exception import Error from .file_pattern_matcher import FilePatternMatcher - from .functions import Function + from .functions import Function, FunctionCall from .image import Image from .mount import Mount from .network_file_system import NetworkFileSystem @@ -52,6 +52,7 @@ "Error", "FilePatternMatcher", "Function", + "FunctionCall", "Image", "Mount", "NetworkFileSystem", diff --git a/modal/_functions.py b/modal/_functions.py index 46674cfb9..cf8338b43 100644 --- a/modal/_functions.py +++ b/modal/_functions.py @@ -1474,7 +1474,7 @@ async def _experimental_spawn(self, *args: P.args, **kwargs: P.kwargs) -> "_Func This experimental version of the spawn method allows up to 1 million inputs to be spawned. - Returns a `modal.functions.FunctionCall` object, that can later be polled or + Returns a `modal.FunctionCall` object, that can later be polled or waited for using `.get(timeout=...)`. Conceptually similar to `multiprocessing.pool.apply_async`, or a Future/Promise in other contexts. """ @@ -1497,7 +1497,7 @@ async def _experimental_spawn(self, *args: P.args, **kwargs: P.kwargs) -> "_Func async def spawn(self, *args: P.args, **kwargs: P.kwargs) -> "_FunctionCall[ReturnType]": """Calls the function with the given arguments, without waiting for the results. - Returns a `modal.functions.FunctionCall` object, that can later be polled or + Returns a `modal.FunctionCall` object, that can later be polled or waited for using `.get(timeout=...)`. Conceptually similar to `multiprocessing.pool.apply_async`, or a Future/Promise in other contexts. """