modal 1.1.2.dev3__py3-none-any.whl → 1.1.2.dev5__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/__main__.py +1 -2
- modal/client.pyi +2 -2
- modal/config.py +7 -7
- modal/functions.pyi +6 -6
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/METADATA +1 -1
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/RECORD +14 -14
- modal_proto/api.proto +1 -0
- modal_proto/api_pb2.py +536 -536
- modal_proto/api_pb2.pyi +8 -2
- modal_version/__init__.py +1 -1
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/WHEEL +0 -0
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/entry_points.txt +0 -0
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.2.dev3.dist-info → modal-1.1.2.dev5.dist-info}/top_level.txt +0 -0
modal/__main__.py
CHANGED
|
@@ -37,7 +37,6 @@ def main():
|
|
|
37
37
|
|
|
38
38
|
from grpclib import GRPCError, Status
|
|
39
39
|
from rich.panel import Panel
|
|
40
|
-
from rich.text import Text
|
|
41
40
|
|
|
42
41
|
if isinstance(exc, GRPCError):
|
|
43
42
|
status_map = {
|
|
@@ -69,7 +68,7 @@ def main():
|
|
|
69
68
|
content = f"{content}\n\nNote: {' '.join(notes)}"
|
|
70
69
|
|
|
71
70
|
console = make_console(stderr=True)
|
|
72
|
-
panel = Panel(
|
|
71
|
+
panel = Panel(content, title=title, title_align="left", border_style="red")
|
|
73
72
|
console.print(panel, highlight=False)
|
|
74
73
|
sys.exit(1)
|
|
75
74
|
|
modal/client.pyi
CHANGED
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.2.
|
|
36
|
+
version: str = "1.1.2.dev5",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.2.
|
|
167
|
+
version: str = "1.1.2.dev5",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
modal/config.py
CHANGED
|
@@ -94,7 +94,7 @@ from google.protobuf.empty_pb2 import Empty
|
|
|
94
94
|
from modal_proto import api_pb2
|
|
95
95
|
|
|
96
96
|
from ._utils.logger import configure_logger
|
|
97
|
-
from .exception import InvalidError
|
|
97
|
+
from .exception import InvalidError, NotFoundError
|
|
98
98
|
|
|
99
99
|
DEFAULT_SERVER_URL = "https://api.modal.com"
|
|
100
100
|
|
|
@@ -158,15 +158,15 @@ def _config_active_profile() -> str:
|
|
|
158
158
|
return "default"
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
def config_set_active_profile(
|
|
161
|
+
def config_set_active_profile(profile: str) -> None:
|
|
162
162
|
"""Set the user's active modal profile by writing it to the `.modal.toml` file."""
|
|
163
|
-
if
|
|
164
|
-
raise
|
|
163
|
+
if profile not in _user_config:
|
|
164
|
+
raise NotFoundError(f"No profile named '{profile}' found in {user_config_path}")
|
|
165
165
|
|
|
166
|
-
for
|
|
167
|
-
|
|
166
|
+
for profile_data in _user_config.values():
|
|
167
|
+
profile_data.pop("active", None)
|
|
168
168
|
|
|
169
|
-
_user_config[
|
|
169
|
+
_user_config[profile]["active"] = True # type: ignore
|
|
170
170
|
_write_user_config(_user_config)
|
|
171
171
|
|
|
172
172
|
|
modal/functions.pyi
CHANGED
|
@@ -427,7 +427,7 @@ class Function(
|
|
|
427
427
|
|
|
428
428
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
429
429
|
|
|
430
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
430
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
431
431
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
432
432
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
433
433
|
...
|
|
@@ -436,7 +436,7 @@ class Function(
|
|
|
436
436
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
437
437
|
...
|
|
438
438
|
|
|
439
|
-
remote: __remote_spec[modal._functions.
|
|
439
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
|
440
440
|
|
|
441
441
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
442
442
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -463,7 +463,7 @@ class Function(
|
|
|
463
463
|
"""
|
|
464
464
|
...
|
|
465
465
|
|
|
466
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
466
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
467
467
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
468
468
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
469
469
|
|
|
@@ -487,7 +487,7 @@ class Function(
|
|
|
487
487
|
...
|
|
488
488
|
|
|
489
489
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
490
|
-
modal._functions.
|
|
490
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
|
491
491
|
]
|
|
492
492
|
|
|
493
493
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -496,7 +496,7 @@ class Function(
|
|
|
496
496
|
|
|
497
497
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
498
498
|
|
|
499
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
499
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
|
500
500
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
501
501
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
502
502
|
|
|
@@ -517,7 +517,7 @@ class Function(
|
|
|
517
517
|
"""
|
|
518
518
|
...
|
|
519
519
|
|
|
520
|
-
spawn: __spawn_spec[modal._functions.
|
|
520
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
|
521
521
|
|
|
522
522
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
523
523
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
modal/__init__.py,sha256=WMaRW-2IJRGA9ioNAaBhJYuyLvu-GS01L8wQD90fKBs,2682
|
|
2
|
-
modal/__main__.py,sha256=
|
|
2
|
+
modal/__main__.py,sha256=45H-GtwzaDfN-1nP4_HYvzN3s7AG_HXR4-ynrsjO_OI,2803
|
|
3
3
|
modal/_clustered_functions.py,sha256=zmrKbptRbqp4euS3LWncKaLXb8Kjj4YreusOzpEpRMk,2856
|
|
4
4
|
modal/_clustered_functions.pyi,sha256=_wtFjWocGf1WgI-qYBpbJPArNkg2H9JV7BVaGgMesEQ,1103
|
|
5
5
|
modal/_container_entrypoint.py,sha256=1qBMNY_E9ICC_sRCtillMxmKPsmxJl1J0_qOAG8rH-0,28288
|
|
@@ -22,12 +22,12 @@ modal/app.py,sha256=kpq4kXp7pch688y6g55QYAC10wqPTU5FXKoWPMirA3E,47899
|
|
|
22
22
|
modal/app.pyi,sha256=-jKXlGDBWRPVsuenBhdMRqawK-L2eiJ7gHbmSblhltg,43525
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=Nvs8SDDhrbxNENPrXRovDqf5XATGbiL6XgcYP-sdh2c,15829
|
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=-qSfYAQvIoO_l2wsCCGTG5ZUwQieNKXdAO00yP1-LYU,7394
|
|
28
28
|
modal/cls.py,sha256=7A0xGnugQzm8dOfnKMjLjtqekRlRtQ0jPFRYgq6xdUM,40018
|
|
29
29
|
modal/cls.pyi,sha256=_tZ5qrlL-ZDEcD-mf9BZkkNH5XPr4SmGTEQ-RVmqF3I,27772
|
|
30
|
-
modal/config.py,sha256=
|
|
30
|
+
modal/config.py,sha256=tW-SEGjVvAt3D_MNi3LhxXnFKIA9fjLd3UIgbW8uSJE,12121
|
|
31
31
|
modal/container_process.py,sha256=XkPwNIW-iD_GB9u9yqv9q8y-i5cQ8eBbLZZ_GvEw9t8,6858
|
|
32
32
|
modal/container_process.pyi,sha256=9m-st3hCUlNN1GOTctfPPvIvoLtEl7FbuGWwif5-7YU,6037
|
|
33
33
|
modal/dict.py,sha256=IWpPQtBwR96TJN7ogpIZvL9Ge9rxY4KJ2CjkUKfWr6g,15864
|
|
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=BVqAJ0sgPUfN8QsYztWiGB4j56he60TncM02KsylnCw,21449
|
|
|
39
39
|
modal/file_io.pyi,sha256=cPT_hsplE5iLCXhYOLn1Sp9eDdk7DxdFmicQHanJZyg,15918
|
|
40
40
|
modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE,8116
|
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
|
42
|
-
modal/functions.pyi,sha256=
|
|
42
|
+
modal/functions.pyi,sha256=VYPnfnCLfHRDAl6t5AaVHmZEz0T5f2igjTeMOtHPie8,34766
|
|
43
43
|
modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
|
|
44
44
|
modal/image.py,sha256=A83nmo0zfCUwgvJh0LZ7Yc1sYvDnZLl_phbKxN-9HIw,103144
|
|
45
45
|
modal/image.pyi,sha256=oH-GCHVEwD5fOX0K_IaWN5RKZlYwX82z-K4wxx8aN3c,68541
|
|
@@ -151,7 +151,7 @@ modal/experimental/__init__.py,sha256=nuc7AL4r_Fs08DD5dciWFZhrV1nanwoClOfdTcudU0
|
|
|
151
151
|
modal/experimental/flash.py,sha256=viXQumCIFp5VFsPFURdFTBTjP_QnsAi8nSWXAMmfjeQ,19744
|
|
152
152
|
modal/experimental/flash.pyi,sha256=A8_qJGtGoXEzKDdHbvhmCw7oqfneFEvJQK3ZdTOvUdU,10830
|
|
153
153
|
modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
|
|
154
|
-
modal-1.1.2.
|
|
154
|
+
modal-1.1.2.dev5.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
155
155
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
156
156
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
157
157
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -159,10 +159,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
|
159
159
|
modal_docs/mdmd/mdmd.py,sha256=eW5MzrEl7mSclDo4Uv64sQ1-4IyLggldbgUJdBVLDdI,6449
|
|
160
160
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
|
161
161
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
|
162
|
-
modal_proto/api.proto,sha256=
|
|
162
|
+
modal_proto/api.proto,sha256=byvROblaUKvWzEsJBmhUDkqXCvCIENdEu1wcX21CGQY,103853
|
|
163
163
|
modal_proto/api_grpc.py,sha256=1mDcIexGtoVq0675-sqlYVr_M2ncGETpmKsOP7VwE3Y,126369
|
|
164
|
-
modal_proto/api_pb2.py,sha256=
|
|
165
|
-
modal_proto/api_pb2.pyi,sha256=
|
|
164
|
+
modal_proto/api_pb2.py,sha256=NWN4agq7NgSJMMzxShYu3EExpQRwPH0cBxLWOs0BwwY,364158
|
|
165
|
+
modal_proto/api_pb2.pyi,sha256=NQ7OWnb2gP3QDTInQ78E0DDmwhsrqRNQxygaq2N3SzA,501343
|
|
166
166
|
modal_proto/api_pb2_grpc.py,sha256=tug2WESqUM6l_M8mCkumK0RkDpD_GnMbx-3cH8-Waig,272807
|
|
167
167
|
modal_proto/api_pb2_grpc.pyi,sha256=w1bj43sKHDFOqZnR28_jWWvkFjSFBcRNY8HLGqKO__g,63991
|
|
168
168
|
modal_proto/modal_api_grpc.py,sha256=KL5Nw4AS9hJNxfL6VIeuxHz4jIUN7Unz7hYnoSsqyx0,19071
|
|
@@ -174,10 +174,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
|
174
174
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
175
175
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
|
176
176
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
177
|
-
modal_version/__init__.py,sha256=
|
|
177
|
+
modal_version/__init__.py,sha256=JTDZv3OoN5NztUcE4VJjLoMa4CV9SjWiQC7feCbOkWU,120
|
|
178
178
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
179
|
-
modal-1.1.2.
|
|
180
|
-
modal-1.1.2.
|
|
181
|
-
modal-1.1.2.
|
|
182
|
-
modal-1.1.2.
|
|
183
|
-
modal-1.1.2.
|
|
179
|
+
modal-1.1.2.dev5.dist-info/METADATA,sha256=pEc6L6RUpV7_GsWPbujiVrPePrhWjQtlJKeeYNpb3nk,2459
|
|
180
|
+
modal-1.1.2.dev5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
181
|
+
modal-1.1.2.dev5.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
182
|
+
modal-1.1.2.dev5.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
183
|
+
modal-1.1.2.dev5.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
|
@@ -1819,6 +1819,7 @@ message FunctionOptions {
|
|
|
1819
1819
|
optional uint32 max_concurrent_inputs = 14;
|
|
1820
1820
|
optional uint32 batch_max_size = 15;
|
|
1821
1821
|
optional uint64 batch_linger_ms = 16;
|
|
1822
|
+
optional SchedulerPlacement scheduler_placement = 17;
|
|
1822
1823
|
}
|
|
1823
1824
|
|
|
1824
1825
|
message FunctionPrecreateRequest {
|