modal 0.73.32__py3-none-any.whl → 0.73.34__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/_functions.py +1 -7
- modal/_location.py +0 -29
- modal/client.pyi +2 -2
- modal/sandbox.py +1 -3
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/METADATA +1 -1
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/RECORD +11 -11
- modal_version/_version_generated.py +1 -1
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/LICENSE +0 -0
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/WHEEL +0 -0
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/entry_points.txt +0 -0
- {modal-0.73.32.dist-info → modal-0.73.34.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -19,7 +19,6 @@ from synchronicity.exceptions import UserCodeException
|
|
19
19
|
from modal_proto import api_pb2
|
20
20
|
from modal_proto.modal_api_grpc import ModalClientModal
|
21
21
|
|
22
|
-
from ._location import parse_cloud_provider
|
23
22
|
from ._object import _get_environment_name, _Object, live_method, live_method_gen
|
24
23
|
from ._pty import get_pty_info
|
25
24
|
from ._resolver import Resolver
|
@@ -627,10 +626,6 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
627
626
|
|
628
627
|
if not cloud and not is_builder_function:
|
629
628
|
cloud = config.get("default_cloud")
|
630
|
-
if cloud:
|
631
|
-
cloud_provider = parse_cloud_provider(cloud)
|
632
|
-
else:
|
633
|
-
cloud_provider = None
|
634
629
|
|
635
630
|
if is_generator and webhook_config:
|
636
631
|
if webhook_config.type == api_pb2.WEBHOOK_TYPE_FUNCTION:
|
@@ -819,8 +814,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
819
814
|
task_idle_timeout_secs=container_idle_timeout or 0,
|
820
815
|
concurrency_limit=concurrency_limit or 0,
|
821
816
|
pty_info=pty_info,
|
822
|
-
|
823
|
-
cloud_provider_str=cloud.upper() if cloud else "", # Supersedes cloud_provider
|
817
|
+
cloud_provider_str=cloud if cloud else "",
|
824
818
|
warm_pool_size=keep_warm or 0,
|
825
819
|
runtime=config.get("function_runtime"),
|
826
820
|
runtime_debug=config.get("function_runtime_debug"),
|
modal/_location.py
CHANGED
@@ -1,35 +1,6 @@
|
|
1
1
|
# Copyright Modal Labs 2022
|
2
|
-
from enum import Enum
|
3
|
-
|
4
2
|
import modal_proto.api_pb2
|
5
3
|
|
6
|
-
from .exception import InvalidError
|
7
|
-
|
8
|
-
|
9
|
-
class CloudProvider(Enum):
|
10
|
-
AWS = modal_proto.api_pb2.CLOUD_PROVIDER_AWS
|
11
|
-
GCP = modal_proto.api_pb2.CLOUD_PROVIDER_GCP
|
12
|
-
AUTO = modal_proto.api_pb2.CLOUD_PROVIDER_AUTO
|
13
|
-
OCI = modal_proto.api_pb2.CLOUD_PROVIDER_OCI
|
14
|
-
|
15
|
-
|
16
|
-
def parse_cloud_provider(value: str) -> "modal_proto.api_pb2.CloudProvider.V":
|
17
|
-
try:
|
18
|
-
cloud_provider = CloudProvider[value.upper()]
|
19
|
-
except KeyError:
|
20
|
-
# provider's int identifier may be directly specified
|
21
|
-
try:
|
22
|
-
return int(value) # type: ignore
|
23
|
-
except ValueError:
|
24
|
-
pass
|
25
|
-
|
26
|
-
raise InvalidError(
|
27
|
-
f"Invalid cloud provider: {value}. "
|
28
|
-
f"Value must be one of {[x.name.lower() for x in CloudProvider]} (case-insensitive)."
|
29
|
-
)
|
30
|
-
|
31
|
-
return cloud_provider.value
|
32
|
-
|
33
4
|
|
34
5
|
def display_location(cloud_provider: "modal_proto.api_pb2.CloudProvider.V") -> str:
|
35
6
|
if cloud_provider == modal_proto.api_pb2.CLOUD_PROVIDER_GCP:
|
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.73.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.34"
|
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.73.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.34"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/sandbox.py
CHANGED
@@ -15,7 +15,6 @@ from modal.cloud_bucket_mount import _CloudBucketMount, cloud_bucket_mounts_to_p
|
|
15
15
|
from modal.volume import _Volume
|
16
16
|
from modal_proto import api_pb2
|
17
17
|
|
18
|
-
from ._location import parse_cloud_provider
|
19
18
|
from ._object import _get_environment_name, _Object
|
20
19
|
from ._resolver import Resolver
|
21
20
|
from ._resources import convert_fn_config_to_resources_config
|
@@ -186,8 +185,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
186
185
|
resources=convert_fn_config_to_resources_config(
|
187
186
|
cpu=cpu, memory=memory, gpu=gpu, ephemeral_disk=ephemeral_disk
|
188
187
|
),
|
189
|
-
|
190
|
-
cloud_provider_str=cloud.upper() if cloud else None, # Supersedes cloud_provider
|
188
|
+
cloud_provider_str=cloud if cloud else None, # Supersedes cloud_provider
|
191
189
|
nfs_mounts=network_file_system_mount_protos(validated_network_file_systems, False),
|
192
190
|
runtime_debug=config.get("function_runtime_debug"),
|
193
191
|
cloud_bucket_mounts=cloud_bucket_mounts_to_proto(cloud_bucket_mounts),
|
@@ -3,9 +3,9 @@ modal/__main__.py,sha256=CgIjP8m1xJjjd4AXc-delmR6LdBCZclw2A_V38CFIio,2870
|
|
3
3
|
modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
|
4
4
|
modal/_clustered_functions.pyi,sha256=vllkegc99A0jrUOWa8mdlSbdp6uz36TsHhGxysAOpaQ,771
|
5
5
|
modal/_container_entrypoint.py,sha256=YtfJ852XUDtAWBD-yVs99zy933-VBEKQyIngEj36Qcw,29286
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=ls_u9YqRFLgL5_vAWcTpBkpRQZX0Wx50kCxrt6Tlb_k,71180
|
7
7
|
modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
8
|
-
modal/_location.py,sha256=
|
8
|
+
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
9
|
modal/_object.py,sha256=ItQcsMNkz9Y3kdTsvfNarbW-paJ2qabDyQ7njaqY0XI,11359
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
11
|
modal/_partial_function.py,sha256=KGv4hWXBboiWFxC733jfOHKdvShTPjF75lVv866Lgyc,29078
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=rCOPD51gVyow8muyaqMuV65qfTnAZKf_w1OCZdSF_6o,44636
|
|
22
22
|
modal/app.pyi,sha256=0MMCgskIL4r3eq8oBcfm2lLyeao2gXjS3iXaIfmaJ-o,25959
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=oEUwn4aphdWly9XyCu--z0Y8qVxgnT9y7w9t8QWxbSE,7593
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
28
28
|
modal/cls.py,sha256=5Er9L9tGpLGIrbiHOI7c9266gPG6nhxoJ_BX8op96nU,31096
|
@@ -67,7 +67,7 @@ modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
|
|
67
67
|
modal/runner.py,sha256=fdUyDGN-bWu_aZBvxBO_MIgEuucsA0PgDKDHBn5k8J0,24451
|
68
68
|
modal/runner.pyi,sha256=RYEYsnofrvVroYefWLhWAy8I_uwXV9fRNuJaVgcNzrg,5278
|
69
69
|
modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
|
70
|
-
modal/sandbox.py,sha256=
|
70
|
+
modal/sandbox.py,sha256=39MCW0EQ_CCmZgmhcr_PjT-H-7mo_Dycg9oeeNx3L2Q,32511
|
71
71
|
modal/sandbox.pyi,sha256=cLmSwI1ab-2DgEuXNf6S1PiK63wfUR9dHtxlZtSOuX8,22719
|
72
72
|
modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
|
73
73
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
@@ -172,10 +172,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
172
172
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
173
173
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
174
174
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
175
|
-
modal_version/_version_generated.py,sha256=
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
180
|
-
modal-0.73.
|
181
|
-
modal-0.73.
|
175
|
+
modal_version/_version_generated.py,sha256=Uq8vpXoX7M6MQ85HLh6ReVhc-C0_MbAGw5eRXRR0x2o,149
|
176
|
+
modal-0.73.34.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
177
|
+
modal-0.73.34.dist-info/METADATA,sha256=JId5JwGx7Pr-gIs4F96UcZReJ7Lpshq3xaYjTAR9wlw,2330
|
178
|
+
modal-0.73.34.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
179
|
+
modal-0.73.34.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
180
|
+
modal-0.73.34.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
181
|
+
modal-0.73.34.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|