From c743f4e6b044496dffce23828c466e8aba9911da Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 22 Jan 2025 17:34:41 -0500 Subject: [PATCH] Small docstring fixes (#2791) --- modal/mount.py | 2 +- modal/partial_function.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modal/mount.py b/modal/mount.py index 937bc7eeb..e7c2ae88b 100644 --- a/modal/mount.py +++ b/modal/mount.py @@ -259,7 +259,7 @@ class NonLocalMountError(Exception): class _Mount(_Object, type_prefix="mo"): """ - **Deprecated**: Mounts should not be used explicitly anymore, use image.add_local_* commands instead + **Deprecated**: Mounts should not be used explicitly anymore, use `Image.add_local_*` commands instead. Create a mount for a local directory or file that can be attached to one or more Modal functions. diff --git a/modal/partial_function.py b/modal/partial_function.py index 8f67c44d5..07ffbe0f1 100644 --- a/modal/partial_function.py +++ b/modal/partial_function.py @@ -533,10 +533,12 @@ def _build( _warn_parentheses_missing=None, *, force: bool = False, timeout: int = 86400 ) -> Callable[[Union[Callable[[Any], Any], _PartialFunction]], _PartialFunction]: """ - Decorator for methods that should execute at _build time_ to create a new layer - in a `modal.Image`. + Decorator for methods that execute at _build time_ to create a new Image layer. - See the [lifeycle function guide](https://modal.com/docs/guide/lifecycle-functions#build) for more information. + **Deprecated**: This function is deprecated. We recommend using `modal.Volume` + to store large assets (such as model weights) instead of writing them to the + Image during the build process. For other use cases, you can replace this + decorator with the `Image.run_function` method. **Usage**