modal 0.72.54__py3-none-any.whl → 0.72.56__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- modal/cli/config.py +1 -1
- modal/cli/dict.py +4 -4
- modal/cli/network_file_system.py +6 -13
- modal/cli/queues.py +4 -4
- modal/cli/run.py +1 -1
- modal/cli/volume.py +7 -13
- modal/client.pyi +2 -2
- modal/cls.py +11 -3
- modal/dict.py +11 -3
- modal/environments.py +14 -9
- modal/environments.pyi +3 -7
- modal/functions.py +10 -2
- modal/mount.py +6 -0
- modal/network_file_system.py +11 -3
- modal/queue.py +11 -3
- modal/sandbox.py +1 -1
- modal/secret.py +7 -1
- modal/volume.py +14 -6
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/METADATA +1 -1
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/RECORD +26 -26
- modal_global_objects/mounts/python_standalone.py +1 -1
- modal_version/_version_generated.py +1 -1
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/LICENSE +0 -0
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/WHEEL +0 -0
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/entry_points.txt +0 -0
- {modal-0.72.54.dist-info → modal-0.72.56.dist-info}/top_level.txt +0 -0
modal/cli/config.py
CHANGED
@@ -40,7 +40,7 @@ when running a command that requires an environment.
|
|
40
40
|
@config_cli.command(help=SET_DEFAULT_ENV_HELP)
|
41
41
|
def set_environment(environment_name: str):
|
42
42
|
# Confirm that the environment exists by looking it up
|
43
|
-
Environment.
|
43
|
+
Environment.from_name(environment_name).hydrate()
|
44
44
|
_store_user_config({"environment": environment_name})
|
45
45
|
typer.echo(f"New default environment for profile {_profile}: {environment_name}")
|
46
46
|
|
modal/cli/dict.py
CHANGED
@@ -51,7 +51,7 @@ async def list_(*, json: bool = False, env: Optional[str] = ENV_OPTION):
|
|
51
51
|
@synchronizer.create_blocking
|
52
52
|
async def clear(name: str, *, yes: bool = YES_OPTION, env: Optional[str] = ENV_OPTION):
|
53
53
|
"""Clear the contents of a named Dict by deleting all of its data."""
|
54
|
-
d =
|
54
|
+
d = _Dict.from_name(name, environment_name=env)
|
55
55
|
if not yes:
|
56
56
|
typer.confirm(
|
57
57
|
f"Are you sure you want to irrevocably delete the contents of modal.Dict '{name}'?",
|
@@ -66,7 +66,7 @@ async def clear(name: str, *, yes: bool = YES_OPTION, env: Optional[str] = ENV_O
|
|
66
66
|
async def delete(name: str, *, yes: bool = YES_OPTION, env: Optional[str] = ENV_OPTION):
|
67
67
|
"""Delete a named Dict and all of its data."""
|
68
68
|
# Lookup first to validate the name, even though delete is a staticmethod
|
69
|
-
await _Dict.
|
69
|
+
await _Dict.from_name(name, environment_name=env).hydrate()
|
70
70
|
if not yes:
|
71
71
|
typer.confirm(
|
72
72
|
f"Are you sure you want to irrevocably delete the modal.Dict '{name}'?",
|
@@ -83,7 +83,7 @@ async def get(name: str, key: str, *, env: Optional[str] = ENV_OPTION):
|
|
83
83
|
|
84
84
|
Note: When using the CLI, keys are always interpreted as having a string type.
|
85
85
|
"""
|
86
|
-
d =
|
86
|
+
d = _Dict.from_name(name, environment_name=env)
|
87
87
|
console = Console()
|
88
88
|
val = await d.get(key)
|
89
89
|
console.print(val)
|
@@ -110,7 +110,7 @@ async def items(
|
|
110
110
|
Note: By default, this command truncates the contents. Use the `N` argument to control the
|
111
111
|
amount of data shown or the `--all` option to retrieve the entire Dict, which may be slow.
|
112
112
|
"""
|
113
|
-
d =
|
113
|
+
d = _Dict.from_name(name, environment_name=env)
|
114
114
|
|
115
115
|
i, items = 0, []
|
116
116
|
async for key, val in d.items():
|
modal/cli/network_file_system.py
CHANGED
@@ -71,15 +71,6 @@ def create(
|
|
71
71
|
console.print(usage)
|
72
72
|
|
73
73
|
|
74
|
-
async def _volume_from_name(deployment_name: str) -> _NetworkFileSystem:
|
75
|
-
network_file_system = await _NetworkFileSystem.lookup(
|
76
|
-
deployment_name, environment_name=None
|
77
|
-
) # environment None will take value from config
|
78
|
-
if not isinstance(network_file_system, _NetworkFileSystem):
|
79
|
-
raise Exception("The specified app entity is not a network file system")
|
80
|
-
return network_file_system
|
81
|
-
|
82
|
-
|
83
74
|
@nfs_cli.command(
|
84
75
|
name="ls",
|
85
76
|
help="List files and directories in a network file system.",
|
@@ -92,7 +83,7 @@ async def ls(
|
|
92
83
|
env: Optional[str] = ENV_OPTION,
|
93
84
|
):
|
94
85
|
ensure_env(env)
|
95
|
-
volume =
|
86
|
+
volume = _NetworkFileSystem.from_name(volume_name)
|
96
87
|
try:
|
97
88
|
entries = await volume.listdir(path)
|
98
89
|
except GRPCError as exc:
|
@@ -136,7 +127,7 @@ async def put(
|
|
136
127
|
env: Optional[str] = ENV_OPTION,
|
137
128
|
):
|
138
129
|
ensure_env(env)
|
139
|
-
volume =
|
130
|
+
volume = _NetworkFileSystem.from_name(volume_name)
|
140
131
|
if remote_path.endswith("/"):
|
141
132
|
remote_path = remote_path + os.path.basename(local_path)
|
142
133
|
console = Console()
|
@@ -191,7 +182,7 @@ async def get(
|
|
191
182
|
"""
|
192
183
|
ensure_env(env)
|
193
184
|
destination = Path(local_destination)
|
194
|
-
volume =
|
185
|
+
volume = _NetworkFileSystem.from_name(volume_name)
|
195
186
|
console = Console()
|
196
187
|
progress_handler = ProgressHandler(type="download", console=console)
|
197
188
|
with progress_handler.live:
|
@@ -210,7 +201,7 @@ async def rm(
|
|
210
201
|
env: Optional[str] = ENV_OPTION,
|
211
202
|
):
|
212
203
|
ensure_env(env)
|
213
|
-
volume =
|
204
|
+
volume = _NetworkFileSystem.from_name(volume_name)
|
214
205
|
try:
|
215
206
|
await volume.remove_file(remote_path, recursive=recursive)
|
216
207
|
except GRPCError as exc:
|
@@ -230,6 +221,8 @@ async def delete(
|
|
230
221
|
yes: bool = YES_OPTION,
|
231
222
|
env: Optional[str] = ENV_OPTION,
|
232
223
|
):
|
224
|
+
# Lookup first to validate the name, even though delete is a staticmethod
|
225
|
+
await _NetworkFileSystem.from_name(nfs_name, environment_name=env).hydrate()
|
233
226
|
if not yes:
|
234
227
|
typer.confirm(
|
235
228
|
f"Are you sure you want to irrevocably delete the modal.NetworkFileSystem '{nfs_name}'?",
|
modal/cli/queues.py
CHANGED
@@ -46,7 +46,7 @@ async def create(name: str, *, env: Optional[str] = ENV_OPTION):
|
|
46
46
|
async def delete(name: str, *, yes: bool = YES_OPTION, env: Optional[str] = ENV_OPTION):
|
47
47
|
"""Delete a named Queue and all of its data."""
|
48
48
|
# Lookup first to validate the name, even though delete is a staticmethod
|
49
|
-
await _Queue.
|
49
|
+
await _Queue.from_name(name, environment_name=env).hydrate()
|
50
50
|
if not yes:
|
51
51
|
typer.confirm(
|
52
52
|
f"Are you sure you want to irrevocably delete the modal.Queue '{name}'?",
|
@@ -90,7 +90,7 @@ async def clear(
|
|
90
90
|
env: Optional[str] = ENV_OPTION,
|
91
91
|
):
|
92
92
|
"""Clear the contents of a queue by removing all of its data."""
|
93
|
-
q =
|
93
|
+
q = _Queue.from_name(name, environment_name=env)
|
94
94
|
if not yes:
|
95
95
|
typer.confirm(
|
96
96
|
f"Are you sure you want to irrevocably delete the contents of modal.Queue '{name}'?",
|
@@ -106,7 +106,7 @@ async def peek(
|
|
106
106
|
name: str, n: int = Argument(1), partition: Optional[str] = PARTITION_OPTION, *, env: Optional[str] = ENV_OPTION
|
107
107
|
):
|
108
108
|
"""Print the next N items in the queue or queue partition (without removal)."""
|
109
|
-
q =
|
109
|
+
q = _Queue.from_name(name, environment_name=env)
|
110
110
|
console = Console()
|
111
111
|
i = 0
|
112
112
|
async for item in q.iterate(partition=partition):
|
@@ -126,6 +126,6 @@ async def len(
|
|
126
126
|
env: Optional[str] = ENV_OPTION,
|
127
127
|
):
|
128
128
|
"""Print the length of a queue partition or the total length of all partitions."""
|
129
|
-
q =
|
129
|
+
q = _Queue.from_name(name, environment_name=env)
|
130
130
|
console = Console()
|
131
131
|
console.print(await q.len(partition=partition, total=total))
|
modal/cli/run.py
CHANGED
@@ -359,7 +359,7 @@ def deploy(
|
|
359
359
|
stream_logs: bool = typer.Option(False, help="Stream logs from the app upon deployment."),
|
360
360
|
tag: str = typer.Option("", help="Tag the deployment with a version."),
|
361
361
|
):
|
362
|
-
# this ensures that
|
362
|
+
# this ensures that lookups without environment specification use the same env as specified
|
363
363
|
env = ensure_env(env)
|
364
364
|
|
365
365
|
app = import_app(app_ref)
|
modal/cli/volume.py
CHANGED
@@ -94,7 +94,7 @@ async def get(
|
|
94
94
|
"""
|
95
95
|
ensure_env(env)
|
96
96
|
destination = Path(local_destination)
|
97
|
-
volume =
|
97
|
+
volume = _Volume.from_name(volume_name, environment_name=env)
|
98
98
|
console = Console()
|
99
99
|
progress_handler = ProgressHandler(type="download", console=console)
|
100
100
|
with progress_handler.live:
|
@@ -133,9 +133,7 @@ async def ls(
|
|
133
133
|
env: Optional[str] = ENV_OPTION,
|
134
134
|
):
|
135
135
|
ensure_env(env)
|
136
|
-
vol =
|
137
|
-
if not isinstance(vol, _Volume):
|
138
|
-
raise UsageError("The specified app entity is not a modal.Volume")
|
136
|
+
vol = _Volume.from_name(volume_name, environment_name=env)
|
139
137
|
|
140
138
|
try:
|
141
139
|
entries = await vol.listdir(path)
|
@@ -190,9 +188,7 @@ async def put(
|
|
190
188
|
env: Optional[str] = ENV_OPTION,
|
191
189
|
):
|
192
190
|
ensure_env(env)
|
193
|
-
vol = await _Volume.
|
194
|
-
if not isinstance(vol, _Volume):
|
195
|
-
raise UsageError("The specified app entity is not a modal.Volume")
|
191
|
+
vol = await _Volume.from_name(volume_name, environment_name=env).hydrate()
|
196
192
|
|
197
193
|
if remote_path.endswith("/"):
|
198
194
|
remote_path = remote_path + os.path.basename(local_path)
|
@@ -235,9 +231,7 @@ async def rm(
|
|
235
231
|
env: Optional[str] = ENV_OPTION,
|
236
232
|
):
|
237
233
|
ensure_env(env)
|
238
|
-
volume =
|
239
|
-
if not isinstance(volume, _Volume):
|
240
|
-
raise UsageError("The specified app entity is not a modal.Volume")
|
234
|
+
volume = _Volume.from_name(volume_name, environment_name=env)
|
241
235
|
try:
|
242
236
|
await volume.remove_file(remote_path, recursive=recursive)
|
243
237
|
except GRPCError as exc:
|
@@ -261,9 +255,7 @@ async def cp(
|
|
261
255
|
env: Optional[str] = ENV_OPTION,
|
262
256
|
):
|
263
257
|
ensure_env(env)
|
264
|
-
volume =
|
265
|
-
if not isinstance(volume, _Volume):
|
266
|
-
raise UsageError("The specified app entity is not a modal.Volume")
|
258
|
+
volume = _Volume.from_name(volume_name, environment_name=env)
|
267
259
|
*src_paths, dst_path = paths
|
268
260
|
await volume.copy_files(src_paths, dst_path)
|
269
261
|
|
@@ -279,6 +271,8 @@ async def delete(
|
|
279
271
|
yes: bool = YES_OPTION,
|
280
272
|
env: Optional[str] = ENV_OPTION,
|
281
273
|
):
|
274
|
+
# Lookup first to validate the name, even though delete is a staticmethod
|
275
|
+
await _Volume.from_name(volume_name, environment_name=env).hydrate()
|
282
276
|
if not yes:
|
283
277
|
typer.confirm(
|
284
278
|
f"Are you sure you want to irrevocably delete the modal.Volume '{volume_name}'?",
|
modal/client.pyi
CHANGED
@@ -27,7 +27,7 @@ class _Client:
|
|
27
27
|
_snapshotted: bool
|
28
28
|
|
29
29
|
def __init__(
|
30
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.56"
|
31
31
|
): ...
|
32
32
|
def is_closed(self) -> bool: ...
|
33
33
|
@property
|
@@ -85,7 +85,7 @@ class Client:
|
|
85
85
|
_snapshotted: bool
|
86
86
|
|
87
87
|
def __init__(
|
88
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.56"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/cls.py
CHANGED
@@ -228,7 +228,7 @@ class _Obj:
|
|
228
228
|
|
229
229
|
```python notest
|
230
230
|
# Usage on a parametrized function.
|
231
|
-
Model = modal.Cls.
|
231
|
+
Model = modal.Cls.from_name("my-app", "Model")
|
232
232
|
Model("fine-tuned-model").keep_warm(2)
|
233
233
|
```
|
234
234
|
"""
|
@@ -620,7 +620,7 @@ class _Cls(_Object, type_prefix="cs"):
|
|
620
620
|
**Usage:**
|
621
621
|
|
622
622
|
```python notest
|
623
|
-
Model = modal.Cls.
|
623
|
+
Model = modal.Cls.from_name("my_app", "Model")
|
624
624
|
ModelUsingGPU = Model.with_options(gpu="A100")
|
625
625
|
ModelUsingGPU().generate.remote(42) # will run with an A100 GPU
|
626
626
|
```
|
@@ -669,15 +669,23 @@ class _Cls(_Object, type_prefix="cs"):
|
|
669
669
|
) -> "_Cls":
|
670
670
|
"""Lookup a Cls from a deployed App by its name.
|
671
671
|
|
672
|
+
DEPRECATED: This method is deprecated in favor of `modal.Cls.from_name`.
|
673
|
+
|
672
674
|
In contrast to `modal.Cls.from_name`, this is an eager method
|
673
675
|
that will hydrate the local object with metadata from Modal servers.
|
674
676
|
|
675
677
|
```python notest
|
676
|
-
Model = modal.Cls.
|
678
|
+
Model = modal.Cls.from_name("other-app", "Model")
|
677
679
|
model = Model()
|
678
680
|
model.inference(...)
|
679
681
|
```
|
680
682
|
"""
|
683
|
+
deprecation_warning(
|
684
|
+
(2025, 1, 27),
|
685
|
+
"`modal.Cls.lookup` is deprecated and will be removed in a future release."
|
686
|
+
" It can be replaced with `modal.Cls.from_name`."
|
687
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
688
|
+
)
|
681
689
|
obj = _Cls.from_name(
|
682
690
|
app_name, name, namespace=namespace, environment_name=environment_name, workspace=workspace
|
683
691
|
)
|
modal/dict.py
CHANGED
@@ -11,7 +11,7 @@ from ._object import EPHEMERAL_OBJECT_HEARTBEAT_SLEEP, _get_environment_name, _O
|
|
11
11
|
from ._resolver import Resolver
|
12
12
|
from ._serialization import deserialize, serialize
|
13
13
|
from ._utils.async_utils import TaskContext, synchronize_api
|
14
|
-
from ._utils.deprecation import renamed_parameter
|
14
|
+
from ._utils.deprecation import deprecation_warning, renamed_parameter
|
15
15
|
from ._utils.grpc_utils import retry_transient_errors
|
16
16
|
from ._utils.name_utils import check_object_name
|
17
17
|
from .client import _Client
|
@@ -151,14 +151,22 @@ class _Dict(_Object, type_prefix="di"):
|
|
151
151
|
) -> "_Dict":
|
152
152
|
"""Lookup a named Dict.
|
153
153
|
|
154
|
+
DEPRECATED: This method is deprecated in favor of `modal.Dict.from_name`.
|
155
|
+
|
154
156
|
In contrast to `modal.Dict.from_name`, this is an eager method
|
155
157
|
that will hydrate the local object with metadata from Modal servers.
|
156
158
|
|
157
159
|
```python
|
158
|
-
d = modal.Dict.
|
160
|
+
d = modal.Dict.from_name("my-dict")
|
159
161
|
d["xyz"] = 123
|
160
162
|
```
|
161
163
|
"""
|
164
|
+
deprecation_warning(
|
165
|
+
(2025, 1, 27),
|
166
|
+
"`modal.Dict.lookup` is deprecated and will be removed in a future release."
|
167
|
+
" It can be replaced with `modal.Dict.from_name`."
|
168
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
169
|
+
)
|
162
170
|
obj = _Dict.from_name(
|
163
171
|
name,
|
164
172
|
data=data,
|
@@ -180,7 +188,7 @@ class _Dict(_Object, type_prefix="di"):
|
|
180
188
|
client: Optional[_Client] = None,
|
181
189
|
environment_name: Optional[str] = None,
|
182
190
|
):
|
183
|
-
obj = await _Dict.
|
191
|
+
obj = await _Dict.from_name(name, environment_name=environment_name).hydrate(client)
|
184
192
|
req = api_pb2.DictDeleteRequest(dict_id=obj.object_id)
|
185
193
|
await retry_transient_errors(obj._client.stub.DictDelete, req)
|
186
194
|
|
modal/environments.py
CHANGED
@@ -11,7 +11,7 @@ from modal_proto import api_pb2
|
|
11
11
|
from ._object import _Object
|
12
12
|
from ._resolver import Resolver
|
13
13
|
from ._utils.async_utils import synchronize_api, synchronizer
|
14
|
-
from ._utils.deprecation import renamed_parameter
|
14
|
+
from ._utils.deprecation import deprecation_warning, renamed_parameter
|
15
15
|
from ._utils.grpc_utils import retry_transient_errors
|
16
16
|
from ._utils.name_utils import check_object_name
|
17
17
|
from .client import _Client
|
@@ -30,8 +30,7 @@ class _Environment(_Object, type_prefix="en"):
|
|
30
30
|
def __init__(self):
|
31
31
|
"""mdmd:hidden"""
|
32
32
|
raise RuntimeError(
|
33
|
-
"`Environment(...)` constructor is not allowed."
|
34
|
-
" Please use `Environment.from_name` or `Environment.lookup` instead."
|
33
|
+
"`Environment(...)` constructor is not allowed." " Please use `Environment.from_name` instead."
|
35
34
|
)
|
36
35
|
|
37
36
|
# TODO(michael) Keeping this private for now until we decide what else should be in it
|
@@ -54,7 +53,7 @@ class _Environment(_Object, type_prefix="en"):
|
|
54
53
|
|
55
54
|
@staticmethod
|
56
55
|
@renamed_parameter((2024, 12, 18), "label", "name")
|
57
|
-
|
56
|
+
def from_name(
|
58
57
|
name: str,
|
59
58
|
create_if_missing: bool = False,
|
60
59
|
):
|
@@ -89,7 +88,13 @@ class _Environment(_Object, type_prefix="en"):
|
|
89
88
|
client: Optional[_Client] = None,
|
90
89
|
create_if_missing: bool = False,
|
91
90
|
):
|
92
|
-
|
91
|
+
deprecation_warning(
|
92
|
+
(2025, 1, 27),
|
93
|
+
"`modal.Environment.lookup` is deprecated and will be removed in a future release."
|
94
|
+
" It can be replaced with `modal.Environment.from_name`."
|
95
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
96
|
+
)
|
97
|
+
obj = _Environment.from_name(name, create_if_missing=create_if_missing)
|
93
98
|
if client is None:
|
94
99
|
client = await _Client.from_env()
|
95
100
|
resolver = Resolver(client=client)
|
@@ -107,7 +112,7 @@ ENVIRONMENT_CACHE: dict[str, _Environment] = {}
|
|
107
112
|
async def _get_environment_cached(name: str, client: _Client) -> _Environment:
|
108
113
|
if name in ENVIRONMENT_CACHE:
|
109
114
|
return ENVIRONMENT_CACHE[name]
|
110
|
-
environment = await _Environment.
|
115
|
+
environment = await _Environment.from_name(name).hydrate(client)
|
111
116
|
ENVIRONMENT_CACHE[name] = environment
|
112
117
|
return environment
|
113
118
|
|
@@ -164,9 +169,9 @@ async def list_environments(client: Optional[_Client] = None) -> list[api_pb2.En
|
|
164
169
|
def ensure_env(environment_name: Optional[str] = None) -> str:
|
165
170
|
"""Override config environment with environment from environment_name
|
166
171
|
|
167
|
-
This is necessary since a cli command that runs Modal code,
|
168
|
-
|
169
|
-
line flag otherwise, e.g. when doing `modal run --env=foo`
|
172
|
+
This is necessary since a cli command that runs Modal code, without explicit
|
173
|
+
environment specification wouldn't pick up the environment specified in a
|
174
|
+
command line flag otherwise, e.g. when doing `modal run --env=foo`
|
170
175
|
"""
|
171
176
|
if environment_name is not None:
|
172
177
|
config.override_locally("environment", environment_name)
|
modal/environments.pyi
CHANGED
@@ -23,7 +23,7 @@ class _Environment(modal._object._Object):
|
|
23
23
|
def __init__(self): ...
|
24
24
|
def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
|
25
25
|
@staticmethod
|
26
|
-
|
26
|
+
def from_name(name: str, create_if_missing: bool = False): ...
|
27
27
|
@staticmethod
|
28
28
|
async def lookup(
|
29
29
|
name: str, client: typing.Optional[modal.client._Client] = None, create_if_missing: bool = False
|
@@ -34,12 +34,8 @@ class Environment(modal.object.Object):
|
|
34
34
|
|
35
35
|
def __init__(self): ...
|
36
36
|
def _hydrate_metadata(self, metadata: google.protobuf.message.Message): ...
|
37
|
-
|
38
|
-
|
39
|
-
def __call__(self, name: str, create_if_missing: bool = False): ...
|
40
|
-
async def aio(self, name: str, create_if_missing: bool = False): ...
|
41
|
-
|
42
|
-
from_name: __from_name_spec
|
37
|
+
@staticmethod
|
38
|
+
def from_name(name: str, create_if_missing: bool = False): ...
|
43
39
|
|
44
40
|
class __lookup_spec(typing_extensions.Protocol):
|
45
41
|
def __call__(
|
modal/functions.py
CHANGED
@@ -1019,11 +1019,11 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1019
1019
|
|
1020
1020
|
```python notest
|
1021
1021
|
# Usage on a regular function.
|
1022
|
-
f = modal.Function.
|
1022
|
+
f = modal.Function.from_name("my-app", "function")
|
1023
1023
|
f.keep_warm(2)
|
1024
1024
|
|
1025
1025
|
# Usage on a parametrized function.
|
1026
|
-
Model = modal.Cls.
|
1026
|
+
Model = modal.Cls.from_name("my-app", "Model")
|
1027
1027
|
Model("fine-tuned-model").keep_warm(2)
|
1028
1028
|
```
|
1029
1029
|
"""
|
@@ -1096,6 +1096,8 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1096
1096
|
) -> "_Function":
|
1097
1097
|
"""Lookup a Function from a deployed App by its name.
|
1098
1098
|
|
1099
|
+
DEPRECATED: This method is deprecated in favor of `modal.Function.from_name`.
|
1100
|
+
|
1099
1101
|
In contrast to `modal.Function.from_name`, this is an eager method
|
1100
1102
|
that will hydrate the local object with metadata from Modal servers.
|
1101
1103
|
|
@@ -1103,6 +1105,12 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
1103
1105
|
f = modal.Function.lookup("other-app", "function")
|
1104
1106
|
```
|
1105
1107
|
"""
|
1108
|
+
deprecation_warning(
|
1109
|
+
(2025, 1, 27),
|
1110
|
+
"`modal.Function.lookup` is deprecated and will be removed in a future release."
|
1111
|
+
" It can be replaced with `modal.Function.from_name`."
|
1112
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
1113
|
+
)
|
1106
1114
|
obj = _Function.from_name(app_name, name, namespace=namespace, environment_name=environment_name)
|
1107
1115
|
if client is None:
|
1108
1116
|
client = await _Client.from_env()
|
modal/mount.py
CHANGED
@@ -709,6 +709,12 @@ class _Mount(_Object, type_prefix="mo"):
|
|
709
709
|
environment_name: Optional[str] = None,
|
710
710
|
) -> "_Mount":
|
711
711
|
"""mdmd:hidden"""
|
712
|
+
deprecation_warning(
|
713
|
+
(2025, 1, 27),
|
714
|
+
"`modal.Mount.lookup` is deprecated and will be removed in a future release."
|
715
|
+
" It can be replaced with `modal.Mount.from_name`."
|
716
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
717
|
+
)
|
712
718
|
obj = _Mount.from_name(name, namespace=namespace, environment_name=environment_name)
|
713
719
|
if client is None:
|
714
720
|
client = await _Client.from_env()
|
modal/network_file_system.py
CHANGED
@@ -22,7 +22,7 @@ from ._object import (
|
|
22
22
|
from ._resolver import Resolver
|
23
23
|
from ._utils.async_utils import TaskContext, aclosing, async_map, sync_or_async_iter, synchronize_api
|
24
24
|
from ._utils.blob_utils import LARGE_FILE_LIMIT, blob_iter, blob_upload_file
|
25
|
-
from ._utils.deprecation import renamed_parameter
|
25
|
+
from ._utils.deprecation import deprecation_warning, renamed_parameter
|
26
26
|
from ._utils.grpc_utils import retry_transient_errors
|
27
27
|
from ._utils.hash_utils import get_sha256_hex
|
28
28
|
from ._utils.name_utils import check_object_name
|
@@ -84,7 +84,7 @@ class _NetworkFileSystem(_Object, type_prefix="sv"):
|
|
84
84
|
A `NetworkFileSystem` can also be useful for some local scripting scenarios, e.g.:
|
85
85
|
|
86
86
|
```python notest
|
87
|
-
nfs = modal.NetworkFileSystem.
|
87
|
+
nfs = modal.NetworkFileSystem.from_name("my-network-file-system")
|
88
88
|
for chunk in nfs.read_file("my_db_dump.csv"):
|
89
89
|
...
|
90
90
|
```
|
@@ -177,6 +177,8 @@ class _NetworkFileSystem(_Object, type_prefix="sv"):
|
|
177
177
|
) -> "_NetworkFileSystem":
|
178
178
|
"""Lookup a named NetworkFileSystem.
|
179
179
|
|
180
|
+
DEPRECATED: This method is deprecated in favor of `modal.NetworkFileSystem.from_name`.
|
181
|
+
|
180
182
|
In contrast to `modal.NetworkFileSystem.from_name`, this is an eager method
|
181
183
|
that will hydrate the local object with metadata from Modal servers.
|
182
184
|
|
@@ -185,6 +187,12 @@ class _NetworkFileSystem(_Object, type_prefix="sv"):
|
|
185
187
|
print(nfs.listdir("/"))
|
186
188
|
```
|
187
189
|
"""
|
190
|
+
deprecation_warning(
|
191
|
+
(2025, 1, 27),
|
192
|
+
"`modal.NetworkFileSystem.lookup` is deprecated and will be removed in a future release."
|
193
|
+
" It can be replaced with `modal.NetworkFileSystem.from_name`."
|
194
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
195
|
+
)
|
188
196
|
obj = _NetworkFileSystem.from_name(
|
189
197
|
name, namespace=namespace, environment_name=environment_name, create_if_missing=create_if_missing
|
190
198
|
)
|
@@ -217,7 +225,7 @@ class _NetworkFileSystem(_Object, type_prefix="sv"):
|
|
217
225
|
@staticmethod
|
218
226
|
@renamed_parameter((2024, 12, 18), "label", "name")
|
219
227
|
async def delete(name: str, client: Optional[_Client] = None, environment_name: Optional[str] = None):
|
220
|
-
obj = await _NetworkFileSystem.
|
228
|
+
obj = await _NetworkFileSystem.from_name(name, environment_name=environment_name).hydrate(client)
|
221
229
|
req = api_pb2.SharedVolumeDeleteRequest(shared_volume_id=obj.object_id)
|
222
230
|
await retry_transient_errors(obj._client.stub.SharedVolumeDelete, req)
|
223
231
|
|
modal/queue.py
CHANGED
@@ -14,7 +14,7 @@ from ._object import EPHEMERAL_OBJECT_HEARTBEAT_SLEEP, _get_environment_name, _O
|
|
14
14
|
from ._resolver import Resolver
|
15
15
|
from ._serialization import deserialize, serialize
|
16
16
|
from ._utils.async_utils import TaskContext, synchronize_api, warn_if_generator_is_not_consumed
|
17
|
-
from ._utils.deprecation import renamed_parameter
|
17
|
+
from ._utils.deprecation import deprecation_warning, renamed_parameter
|
18
18
|
from ._utils.grpc_utils import retry_transient_errors
|
19
19
|
from ._utils.name_utils import check_object_name
|
20
20
|
from .client import _Client
|
@@ -188,14 +188,22 @@ class _Queue(_Object, type_prefix="qu"):
|
|
188
188
|
) -> "_Queue":
|
189
189
|
"""Lookup a named Queue.
|
190
190
|
|
191
|
+
DEPRECATED: This method is deprecated in favor of `modal.Queue.from_name`.
|
192
|
+
|
191
193
|
In contrast to `modal.Queue.from_name`, this is an eager method
|
192
194
|
that will hydrate the local object with metadata from Modal servers.
|
193
195
|
|
194
|
-
```python
|
196
|
+
```python notest
|
195
197
|
q = modal.Queue.lookup("my-queue")
|
196
198
|
q.put(123)
|
197
199
|
```
|
198
200
|
"""
|
201
|
+
deprecation_warning(
|
202
|
+
(2025, 1, 27),
|
203
|
+
"`modal.Queue.lookup` is deprecated and will be removed in a future release."
|
204
|
+
" It can be replaced with `modal.Queue.from_name`."
|
205
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
206
|
+
)
|
199
207
|
obj = _Queue.from_name(
|
200
208
|
name, namespace=namespace, environment_name=environment_name, create_if_missing=create_if_missing
|
201
209
|
)
|
@@ -208,7 +216,7 @@ class _Queue(_Object, type_prefix="qu"):
|
|
208
216
|
@staticmethod
|
209
217
|
@renamed_parameter((2024, 12, 18), "label", "name")
|
210
218
|
async def delete(name: str, *, client: Optional[_Client] = None, environment_name: Optional[str] = None):
|
211
|
-
obj = await _Queue.
|
219
|
+
obj = await _Queue.from_name(name, environment_name=environment_name).hydrate(client)
|
212
220
|
req = api_pb2.QueueDeleteRequest(queue_id=obj.object_id)
|
213
221
|
await retry_transient_errors(obj._client.stub.QueueDelete, req)
|
214
222
|
|
modal/sandbox.py
CHANGED
@@ -581,7 +581,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
581
581
|
)
|
582
582
|
sandbox = await _Sandbox.from_id(restore_resp.sandbox_id, client)
|
583
583
|
|
584
|
-
task_id_req = api_pb2.SandboxGetTaskIdRequest(sandbox_id=restore_resp.sandbox_id)
|
584
|
+
task_id_req = api_pb2.SandboxGetTaskIdRequest(sandbox_id=restore_resp.sandbox_id, wait_until_ready=True)
|
585
585
|
resp = await retry_transient_errors(client.stub.SandboxGetTaskId, task_id_req)
|
586
586
|
if resp.task_result.status not in [
|
587
587
|
api_pb2.GenericResult.GENERIC_STATUS_UNSPECIFIED,
|
modal/secret.py
CHANGED
@@ -10,7 +10,7 @@ from ._object import _get_environment_name, _Object
|
|
10
10
|
from ._resolver import Resolver
|
11
11
|
from ._runtime.execution_context import is_local
|
12
12
|
from ._utils.async_utils import synchronize_api
|
13
|
-
from ._utils.deprecation import renamed_parameter
|
13
|
+
from ._utils.deprecation import deprecation_warning, renamed_parameter
|
14
14
|
from ._utils.grpc_utils import retry_transient_errors
|
15
15
|
from ._utils.name_utils import check_object_name
|
16
16
|
from .client import _Client
|
@@ -214,6 +214,12 @@ class _Secret(_Object, type_prefix="st"):
|
|
214
214
|
required_keys: list[str] = [],
|
215
215
|
) -> "_Secret":
|
216
216
|
"""mdmd:hidden"""
|
217
|
+
deprecation_warning(
|
218
|
+
(2025, 1, 27),
|
219
|
+
"`modal.Secret.lookup` is deprecated and will be removed in a future release."
|
220
|
+
" It can be replaced with `modal.Secret.from_name`."
|
221
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
222
|
+
)
|
217
223
|
obj = _Secret.from_name(
|
218
224
|
name, namespace=namespace, environment_name=environment_name, required_keys=required_keys
|
219
225
|
)
|
modal/volume.py
CHANGED
@@ -223,14 +223,22 @@ class _Volume(_Object, type_prefix="vo"):
|
|
223
223
|
) -> "_Volume":
|
224
224
|
"""Lookup a named Volume.
|
225
225
|
|
226
|
+
DEPRECATED: This method is deprecated in favor of `modal.Volume.from_name`.
|
227
|
+
|
226
228
|
In contrast to `modal.Volume.from_name`, this is an eager method
|
227
229
|
that will hydrate the local object with metadata from Modal servers.
|
228
230
|
|
229
231
|
```python notest
|
230
|
-
vol = modal.Volume.
|
232
|
+
vol = modal.Volume.from_name("my-volume")
|
231
233
|
print(vol.listdir("/"))
|
232
234
|
```
|
233
235
|
"""
|
236
|
+
deprecation_warning(
|
237
|
+
(2025, 1, 27),
|
238
|
+
"`modal.Volume.lookup` is deprecated and will be removed in a future release."
|
239
|
+
" It can be replaced with `modal.Volume.from_name`."
|
240
|
+
"\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
|
241
|
+
)
|
234
242
|
obj = _Volume.from_name(
|
235
243
|
name,
|
236
244
|
namespace=namespace,
|
@@ -370,7 +378,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
370
378
|
**Example:**
|
371
379
|
|
372
380
|
```python notest
|
373
|
-
vol = modal.Volume.
|
381
|
+
vol = modal.Volume.from_name("my-modal-volume")
|
374
382
|
data = b""
|
375
383
|
for chunk in vol.read_file("1mb.csv"):
|
376
384
|
data += chunk
|
@@ -459,7 +467,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
459
467
|
**Usage**
|
460
468
|
|
461
469
|
```python notest
|
462
|
-
vol = modal.Volume.
|
470
|
+
vol = modal.Volume.from_name("my-modal-volume")
|
463
471
|
|
464
472
|
vol.copy_files(["bar/example.txt"], "bar2") # Copy files to another directory
|
465
473
|
vol.copy_files(["bar/example.txt"], "bar/example2.txt") # Rename a file by copying
|
@@ -483,7 +491,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
483
491
|
**Example:**
|
484
492
|
|
485
493
|
```python notest
|
486
|
-
vol = modal.Volume.
|
494
|
+
vol = modal.Volume.from_name("my-modal-volume")
|
487
495
|
|
488
496
|
with vol.batch_upload() as batch:
|
489
497
|
batch.put_file("local-path.txt", "/remote-path.txt")
|
@@ -502,7 +510,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
502
510
|
@staticmethod
|
503
511
|
@renamed_parameter((2024, 12, 18), "label", "name")
|
504
512
|
async def delete(name: str, client: Optional[_Client] = None, environment_name: Optional[str] = None):
|
505
|
-
obj = await _Volume.
|
513
|
+
obj = await _Volume.from_name(name, environment_name=environment_name).hydrate(client)
|
506
514
|
req = api_pb2.VolumeDeleteRequest(volume_id=obj.object_id)
|
507
515
|
await retry_transient_errors(obj._client.stub.VolumeDelete, req)
|
508
516
|
|
@@ -514,7 +522,7 @@ class _Volume(_Object, type_prefix="vo"):
|
|
514
522
|
client: Optional[_Client] = None,
|
515
523
|
environment_name: Optional[str] = None,
|
516
524
|
):
|
517
|
-
obj = await _Volume.
|
525
|
+
obj = await _Volume.from_name(old_name, environment_name=environment_name).hydrate(client)
|
518
526
|
req = api_pb2.VolumeRenameRequest(volume_id=obj.object_id, name=new_name)
|
519
527
|
await retry_transient_errors(obj._client.stub.VolumeRename, req)
|
520
528
|
|
@@ -20,34 +20,34 @@ modal/app.py,sha256=KNfzLlkI2dJPl9LY8AgW76whZpwIvYKi2E2p9u4F3N4,43659
|
|
20
20
|
modal/app.pyi,sha256=vnQhENaQBhJO6el-ieOcw3NEeYQ314SFXRDtjij4DM8,25324
|
21
21
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
22
22
|
modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
|
23
|
-
modal/client.pyi,sha256=
|
23
|
+
modal/client.pyi,sha256=NZx1nJFmYTW04T1oPNJV3AmG_tWl8yRAwQSyD2wFnS0,7593
|
24
24
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
25
25
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
26
|
-
modal/cls.py,sha256=
|
26
|
+
modal/cls.py,sha256=7k3_FwhPUzewRXRZP8bcVJA9AZstoxGJuHKQ5Db-YoY,32683
|
27
27
|
modal/cls.pyi,sha256=LIoQrf96E2eZXTsO-o87jf2ppGAnYwQ8nVxsDmx7QHs,9040
|
28
28
|
modal/config.py,sha256=BzhZYUUwOmvVwf6x5kf0ywMC257s648dmuhsnB6g3gk,11041
|
29
29
|
modal/container_process.py,sha256=WTqLn01dJPVkPpwR_0w_JH96ceN5mV4TGtiu1ZR2RRA,6108
|
30
30
|
modal/container_process.pyi,sha256=Hf0J5JyDdCCXBJSKx6gvkPOo0XrztCm78xzxamtzUjQ,2828
|
31
|
-
modal/dict.py,sha256=
|
31
|
+
modal/dict.py,sha256=vc5lQVqzeDUCb4fRjnOlqYK2GmBb0fIhZmvB0xIBG0U,12921
|
32
32
|
modal/dict.pyi,sha256=kKb0Kc6RUabtQ5Hwslg_vwL_OIrwIAJ2NXrJTepTtp4,7684
|
33
|
-
modal/environments.py,sha256=
|
34
|
-
modal/environments.pyi,sha256=
|
33
|
+
modal/environments.py,sha256=Q1MpUt4SmBUaLFPzrYxCgGkMaqNBLxRDSLzNxK_Abe4,6949
|
34
|
+
modal/environments.pyi,sha256=JvSroVOIXDIILL40Z5G4HyY16bmih2YMWMvWL-SFTwo,3373
|
35
35
|
modal/exception.py,sha256=4JyO-SACaLNDe2QC48EjsK8GMkZ8AgEurZ8j1YdRu8E,5263
|
36
36
|
modal/experimental.py,sha256=H9FXT3kshbjPLovshT10DicyOkGFrPqILy-qdTX-P7s,4015
|
37
37
|
modal/experimental.pyi,sha256=24tIYu_w9RLwFrz1cIsgYuqmDCtV8eg6-bQNz3zjhDo,939
|
38
38
|
modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
39
39
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
40
40
|
modal/file_pattern_matcher.py,sha256=dSo7BMQGZBAuoBFOX-e_72HxmF3FLzjQlEtnGtJiaD4,6506
|
41
|
-
modal/functions.py,sha256=
|
41
|
+
modal/functions.py,sha256=VTAsXnE-tje8z4ZFgxg-j8XdzAz4iAgr0DDD8TV8yE8,69459
|
42
42
|
modal/functions.pyi,sha256=m2a2ZnjqZFC6REG1_uhA5LM0O1etkFbQH3KnsLSXUKs,26533
|
43
43
|
modal/gpu.py,sha256=2qZMNnoMrjU-5Bu7fx68pANUAKTtZq0EWEEeBA9OUVQ,7426
|
44
44
|
modal/image.py,sha256=leeY7fLfFjS0IqTi3D4cRxIDOb80BPtb3jsQfqvVJ8c,90912
|
45
45
|
modal/image.pyi,sha256=QMKS6E3CsZr5DoyNqGpcJPBYJTJZSvtAQIsAhPVd_E4,26347
|
46
46
|
modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
|
47
47
|
modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
|
48
|
-
modal/mount.py,sha256=
|
48
|
+
modal/mount.py,sha256=zk5hncXdiHiO2ZqKUIuan_ON8GZ-ZYnxqqVA7yVHRxY,32116
|
49
49
|
modal/mount.pyi,sha256=dvdr4joSpW7oKnKyg9eDD0obFfekwZtW65j4NEomivQ,12523
|
50
|
-
modal/network_file_system.py,sha256=
|
50
|
+
modal/network_file_system.py,sha256=WXdyL7du_fvjvuG6hSAREyJ83sSEP2xSLAIAhBsisdI,14869
|
51
51
|
modal/network_file_system.pyi,sha256=4N3eqMbTSlqmS8VV_aJK-uvrgJC8xnf_YtW5FHfRfc8,8156
|
52
52
|
modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
|
53
53
|
modal/object.pyi,sha256=kyJkRQcVv3ct7zSAxvvXcuhBVeH914v80uSlqeS7cA4,5632
|
@@ -59,17 +59,17 @@ modal/partial_function.pyi,sha256=Dj4WDxbGkXjxAbucSBSqr2_vrNbEWEAwdXnMzh2d80Y,99
|
|
59
59
|
modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
|
60
60
|
modal/proxy.pyi,sha256=1OEKIVUyC-xb7fHMzngakQso0nTsK60TVhXtlcMj6Wk,390
|
61
61
|
modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
|
-
modal/queue.py,sha256=
|
62
|
+
modal/queue.py,sha256=02HUroxLIiWQemHYS6PDXH2eM51CUeFP7nQ6Usb1V04,18987
|
63
63
|
modal/queue.pyi,sha256=sgvELCK4bJXMZIZw7gllooGFZNipGjI3BT4rmUuyD9M,10282
|
64
64
|
modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
|
65
65
|
modal/runner.py,sha256=0SCMgKO8lZ9W1C7le1EcgViKERMXpi_-QBd6PF_MH0Q,24450
|
66
66
|
modal/runner.pyi,sha256=YmP4EOCNjjkwSIPi2Gl6hF_ji_ytkxz9dw3iB9KXaOI,5275
|
67
67
|
modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
|
68
|
-
modal/sandbox.py,sha256=
|
68
|
+
modal/sandbox.py,sha256=QJTK-IUHe_SOvq-mv337xcVs2zct-I6ngwOqLkYDvoQ,31773
|
69
69
|
modal/sandbox.pyi,sha256=qncEvzK76h_ehrs03vlroQyLThWiMsjKhD0DnCNc6zI,22663
|
70
70
|
modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
|
71
71
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
72
|
-
modal/secret.py,sha256=
|
72
|
+
modal/secret.py,sha256=U2Jivqdb94eI_BrGCMVbCots8F2gDcbXLMia_gVlej0,10455
|
73
73
|
modal/secret.pyi,sha256=W4g_BOSxafYm-K9PvFc7-li3a-rsCFNkYgHTZXr1AFA,2974
|
74
74
|
modal/serving.py,sha256=MnVuTsimN05LfNPxuJZ4sr5s1_BPUkIsOP_VC-bkp78,4464
|
75
75
|
modal/serving.pyi,sha256=ncV-9jY_vZYFnGs5ZnMb3ffrX8LmcLdIMHBC56xRbtE,1711
|
@@ -78,7 +78,7 @@ modal/snapshot.pyi,sha256=Ypd4NKsjOTnnnqXyTGGLKq5lkocRrUURYjY5Pi67_qA,670
|
|
78
78
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
79
79
|
modal/token_flow.py,sha256=LcgSce_MSQ2p7j55DPwpVRpiAtCDe8GRSEwzO7muNR8,6774
|
80
80
|
modal/token_flow.pyi,sha256=0XV3d-9CGQL3qjPdw3RgwIFVqqxo8Z-u044_mkgAM3o,2064
|
81
|
-
modal/volume.py,sha256=
|
81
|
+
modal/volume.py,sha256=JAWeDvoAG95tMBv-fYIERyHsJPS_X_xGpxRRmYtb6j0,30096
|
82
82
|
modal/volume.pyi,sha256=kTsXarphjZILXci84LQy7EyC84eXUs5-7D62IM5q3eE,12491
|
83
83
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
84
84
|
modal/_runtime/asgi.py,sha256=c4hmaMW1pLo-cm7ouriJjieuFm4ZF6D2LMy0638sfOs,22139
|
@@ -113,21 +113,21 @@ modal/cli/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
|
|
113
113
|
modal/cli/_download.py,sha256=t6BXZwjTd9MgznDvbsV8rp0FZWggdzC-lUAGZU4xx1g,3984
|
114
114
|
modal/cli/_traceback.py,sha256=QlLa_iw3fAOA-mqCqjS8qAxvNT48J3YY3errtVVc2cw,7316
|
115
115
|
modal/cli/app.py,sha256=TmUiFKAE1yc6ll8pfl-wZ2lh9crC31Fu_8_YKCX8NJc,7818
|
116
|
-
modal/cli/config.py,sha256=
|
116
|
+
modal/cli/config.py,sha256=QvFsqO4eUOtI7d_pQAOAyfq_ZitjhPtav3C6GIDQcZM,1680
|
117
117
|
modal/cli/container.py,sha256=FYwEgjf93j4NMorAjGbSV98i1wpebqdAeNU1wfrFp1k,3668
|
118
|
-
modal/cli/dict.py,sha256=
|
118
|
+
modal/cli/dict.py,sha256=8Wq3w-UDaywk8EVNdj-ECCNV9TYHqh4kzhUqhhulatM,4593
|
119
119
|
modal/cli/entry_point.py,sha256=aaNxFAqZcmtSjwzkYIA_Ba9CkL4cL4_i2gy5VjoXxkM,4228
|
120
120
|
modal/cli/environment.py,sha256=Ayddkiq9jdj3XYDJ8ZmUqFpPPH8xajYlbexRkzGtUcg,4334
|
121
121
|
modal/cli/import_refs.py,sha256=-FVm5nBv8LdEelgKdVEPOoqrdzKzYH48Vvwaq5B9Vyw,11869
|
122
122
|
modal/cli/launch.py,sha256=pzQt2QlcrbIUU0MVzWWPAvMQ6MCyqsHZ0X9JcV-sY04,3242
|
123
|
-
modal/cli/network_file_system.py,sha256=
|
123
|
+
modal/cli/network_file_system.py,sha256=eq3JnwjbfFNsJodIyANHL06ByYc3BSavzdmu8C96cHA,7948
|
124
124
|
modal/cli/profile.py,sha256=rLXfjJObfPNjaZvNfHGIKqs7y9bGYyGe-K7V0w-Ni0M,3110
|
125
|
-
modal/cli/queues.py,sha256=
|
126
|
-
modal/cli/run.py,sha256=
|
125
|
+
modal/cli/queues.py,sha256=6gTu76dzBtPN5eQVsLrvQpuru5jI9ZCWK5Eh8J8XhaM,4498
|
126
|
+
modal/cli/run.py,sha256=v9qtijHyDqT7cDRc5NOFBzhtsBIT75lfA3xnVRsbP4E,20041
|
127
127
|
modal/cli/secret.py,sha256=uQpwYrMY98iMCWeZOQTcktOYhPTZ8IHnyealDc2CZqo,4206
|
128
128
|
modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
|
129
129
|
modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
|
130
|
-
modal/cli/volume.py,sha256=
|
130
|
+
modal/cli/volume.py,sha256=zVZTTRSi1iWy9Rnwx7WyoLSq73Jd_n1z8fx-QlDkNIQ,10266
|
131
131
|
modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
132
132
|
modal/cli/programs/run_jupyter.py,sha256=1X8eQ3gB_IqkJn11Q4dQ9KdIqFVwQQlwkrrSqlFWfPQ,2685
|
133
133
|
modal/cli/programs/vscode.py,sha256=c5jKk1ruuC03X1D-hNc2jtTQqofCBweEZH_qxHjkHGo,3383
|
@@ -150,7 +150,7 @@ modal_global_objects/images/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
|
|
150
150
|
modal_global_objects/images/base_images.py,sha256=tFc7tzQRJHtq23kURd6DTrnnO4Yp5ujr34WdJOM5ubI,775
|
151
151
|
modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
152
152
|
modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
|
153
|
-
modal_global_objects/mounts/python_standalone.py,sha256=
|
153
|
+
modal_global_objects/mounts/python_standalone.py,sha256=EsC-hdPtiAPOwgW9emHN6muNUkrJwR8dYxroVArxHxM,1841
|
154
154
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
155
155
|
modal_proto/api.proto,sha256=wI8-SbbAGRYqlWa5yv26MyrOC7VdF4hwSON_WqRMlCA,85215
|
156
156
|
modal_proto/api_grpc.py,sha256=FYGqDegM_w_qxdtlxum8k31mDibKoMvmNxv_p9cKdKs,109056
|
@@ -169,10 +169,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
169
169
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
170
170
|
modal_version/__init__.py,sha256=kGya2ZlItX2zB7oHORs-wvP4PG8lg_mtbi1QIK3G6SQ,470
|
171
171
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
172
|
-
modal_version/_version_generated.py,sha256=
|
173
|
-
modal-0.72.
|
174
|
-
modal-0.72.
|
175
|
-
modal-0.72.
|
176
|
-
modal-0.72.
|
177
|
-
modal-0.72.
|
178
|
-
modal-0.72.
|
172
|
+
modal_version/_version_generated.py,sha256=iPX_Knegz9ad2KngLCBJJp1uIDoBCu3PX04r6mMrbN0,149
|
173
|
+
modal-0.72.56.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
174
|
+
modal-0.72.56.dist-info/METADATA,sha256=MOw0ZgsW4nPdUP8nvuQWHTOHktBm1PgtGciJvx1C1is,2329
|
175
|
+
modal-0.72.56.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
176
|
+
modal-0.72.56.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-0.72.56.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
178
|
+
modal-0.72.56.dist-info/RECORD,,
|
@@ -26,7 +26,7 @@ def publish_python_standalone_mount(client, version: str) -> None:
|
|
26
26
|
profile_environment = config.get("environment")
|
27
27
|
mount_name = python_standalone_mount_name(f"{version}-{libc}")
|
28
28
|
try:
|
29
|
-
Mount.
|
29
|
+
Mount.from_name(mount_name, namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL).hydrate(client)
|
30
30
|
print(f"✅ Found existing mount {mount_name} in global namespace.")
|
31
31
|
except NotFoundError:
|
32
32
|
print(f"📦 Unpacking python-build-standalone for {version}-{libc}.")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|