modal 1.1.5.dev66__py3-none-any.whl → 1.3.1.dev8__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/__init__.py +4 -4
- modal/__main__.py +4 -29
- modal/_billing.py +84 -0
- modal/_clustered_functions.py +1 -3
- modal/_container_entrypoint.py +33 -208
- modal/_functions.py +171 -138
- modal/_grpc_client.py +191 -0
- modal/_ipython.py +16 -6
- modal/_load_context.py +106 -0
- modal/_object.py +72 -21
- modal/_output.py +12 -14
- modal/_partial_function.py +31 -4
- modal/_resolver.py +44 -57
- modal/_runtime/container_io_manager.py +30 -28
- modal/_runtime/container_io_manager.pyi +42 -44
- modal/_runtime/gpu_memory_snapshot.py +9 -7
- modal/_runtime/user_code_event_loop.py +80 -0
- modal/_runtime/user_code_imports.py +236 -10
- modal/_serialization.py +2 -1
- modal/_traceback.py +4 -13
- modal/_tunnel.py +16 -11
- modal/_tunnel.pyi +25 -3
- modal/_utils/async_utils.py +337 -10
- modal/_utils/auth_token_manager.py +1 -4
- modal/_utils/blob_utils.py +29 -22
- modal/_utils/function_utils.py +20 -21
- modal/_utils/grpc_testing.py +6 -3
- modal/_utils/grpc_utils.py +223 -64
- modal/_utils/mount_utils.py +26 -1
- modal/_utils/name_utils.py +2 -3
- modal/_utils/package_utils.py +0 -1
- modal/_utils/rand_pb_testing.py +8 -1
- modal/_utils/task_command_router_client.py +524 -0
- modal/_vendor/cloudpickle.py +144 -48
- modal/app.py +285 -105
- modal/app.pyi +216 -53
- modal/billing.py +5 -0
- modal/builder/2025.06.txt +6 -3
- modal/builder/PREVIEW.txt +2 -1
- modal/builder/base-images.json +4 -2
- modal/cli/_download.py +19 -3
- modal/cli/cluster.py +4 -2
- modal/cli/config.py +3 -1
- modal/cli/container.py +5 -4
- modal/cli/dict.py +5 -2
- modal/cli/entry_point.py +26 -2
- modal/cli/environment.py +2 -16
- modal/cli/launch.py +1 -76
- modal/cli/network_file_system.py +5 -20
- modal/cli/programs/run_jupyter.py +1 -1
- modal/cli/programs/vscode.py +1 -1
- modal/cli/queues.py +5 -4
- modal/cli/run.py +24 -204
- modal/cli/secret.py +1 -2
- modal/cli/shell.py +375 -0
- modal/cli/utils.py +1 -13
- modal/cli/volume.py +11 -17
- modal/client.py +16 -125
- modal/client.pyi +94 -144
- modal/cloud_bucket_mount.py +3 -1
- modal/cloud_bucket_mount.pyi +4 -0
- modal/cls.py +101 -64
- modal/cls.pyi +9 -8
- modal/config.py +21 -1
- modal/container_process.py +288 -12
- modal/container_process.pyi +99 -38
- modal/dict.py +72 -33
- modal/dict.pyi +88 -57
- modal/environments.py +16 -8
- modal/environments.pyi +6 -2
- modal/exception.py +154 -16
- modal/experimental/__init__.py +24 -53
- modal/experimental/flash.py +161 -74
- modal/experimental/flash.pyi +97 -49
- modal/file_io.py +50 -92
- modal/file_io.pyi +117 -89
- modal/functions.pyi +70 -87
- modal/image.py +82 -47
- modal/image.pyi +51 -30
- modal/io_streams.py +500 -149
- modal/io_streams.pyi +279 -189
- modal/mount.py +60 -46
- modal/mount.pyi +41 -17
- modal/network_file_system.py +19 -11
- modal/network_file_system.pyi +72 -39
- modal/object.pyi +114 -22
- modal/parallel_map.py +42 -44
- modal/parallel_map.pyi +9 -17
- modal/partial_function.pyi +4 -2
- modal/proxy.py +14 -6
- modal/proxy.pyi +10 -2
- modal/queue.py +45 -38
- modal/queue.pyi +88 -52
- modal/runner.py +96 -96
- modal/runner.pyi +44 -27
- modal/sandbox.py +225 -107
- modal/sandbox.pyi +226 -60
- modal/secret.py +58 -56
- modal/secret.pyi +28 -13
- modal/serving.py +7 -11
- modal/serving.pyi +7 -8
- modal/snapshot.py +29 -15
- modal/snapshot.pyi +18 -10
- modal/token_flow.py +1 -1
- modal/token_flow.pyi +4 -6
- modal/volume.py +102 -55
- modal/volume.pyi +125 -66
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/METADATA +10 -9
- modal-1.3.1.dev8.dist-info/RECORD +189 -0
- modal_proto/api.proto +141 -70
- modal_proto/api_grpc.py +42 -26
- modal_proto/api_pb2.py +1123 -1103
- modal_proto/api_pb2.pyi +331 -83
- modal_proto/api_pb2_grpc.py +80 -48
- modal_proto/api_pb2_grpc.pyi +26 -18
- modal_proto/modal_api_grpc.py +175 -174
- modal_proto/task_command_router.proto +164 -0
- modal_proto/task_command_router_grpc.py +138 -0
- modal_proto/task_command_router_pb2.py +180 -0
- modal_proto/{sandbox_router_pb2.pyi → task_command_router_pb2.pyi} +148 -57
- modal_proto/task_command_router_pb2_grpc.py +272 -0
- modal_proto/task_command_router_pb2_grpc.pyi +100 -0
- modal_version/__init__.py +1 -1
- modal_version/__main__.py +1 -1
- modal/cli/programs/launch_instance_ssh.py +0 -94
- modal/cli/programs/run_marimo.py +0 -95
- modal-1.1.5.dev66.dist-info/RECORD +0 -191
- modal_proto/modal_options_grpc.py +0 -3
- modal_proto/options.proto +0 -19
- modal_proto/options_grpc.py +0 -3
- modal_proto/options_pb2.py +0 -35
- modal_proto/options_pb2.pyi +0 -20
- modal_proto/options_pb2_grpc.py +0 -4
- modal_proto/options_pb2_grpc.pyi +0 -7
- modal_proto/sandbox_router.proto +0 -125
- modal_proto/sandbox_router_grpc.py +0 -89
- modal_proto/sandbox_router_pb2.py +0 -128
- modal_proto/sandbox_router_pb2_grpc.py +0 -169
- modal_proto/sandbox_router_pb2_grpc.pyi +0 -63
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev66.dist-info → modal-1.3.1.dev8.dist-info}/top_level.txt +0 -0
modal_proto/api_grpc.py
CHANGED
|
@@ -9,7 +9,7 @@ import grpclib.client
|
|
|
9
9
|
if typing.TYPE_CHECKING:
|
|
10
10
|
import grpclib.server
|
|
11
11
|
|
|
12
|
-
import
|
|
12
|
+
import google.protobuf.any_pb2
|
|
13
13
|
import google.protobuf.empty_pb2
|
|
14
14
|
import google.protobuf.struct_pb2
|
|
15
15
|
import google.protobuf.timestamp_pb2
|
|
@@ -55,6 +55,10 @@ class ModalClientBase(abc.ABC):
|
|
|
55
55
|
async def AppGetOrCreate(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppGetOrCreateRequest, modal_proto.api_pb2.AppGetOrCreateResponse]') -> None:
|
|
56
56
|
pass
|
|
57
57
|
|
|
58
|
+
@abc.abstractmethod
|
|
59
|
+
async def AppGetTags(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppGetTagsRequest, modal_proto.api_pb2.AppGetTagsResponse]') -> None:
|
|
60
|
+
pass
|
|
61
|
+
|
|
58
62
|
@abc.abstractmethod
|
|
59
63
|
async def AppHeartbeat(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppHeartbeatRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
|
60
64
|
pass
|
|
@@ -79,6 +83,10 @@ class ModalClientBase(abc.ABC):
|
|
|
79
83
|
async def AppSetObjects(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppSetObjectsRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
|
80
84
|
pass
|
|
81
85
|
|
|
86
|
+
@abc.abstractmethod
|
|
87
|
+
async def AppSetTags(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppSetTagsRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
|
88
|
+
pass
|
|
89
|
+
|
|
82
90
|
@abc.abstractmethod
|
|
83
91
|
async def AppStop(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.AppStopRequest, google.protobuf.empty_pb2.Empty]') -> None:
|
|
84
92
|
pass
|
|
@@ -475,10 +483,6 @@ class ModalClientBase(abc.ABC):
|
|
|
475
483
|
async def SandboxCreateConnectToken(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxCreateConnectTokenRequest, modal_proto.api_pb2.SandboxCreateConnectTokenResponse]') -> None:
|
|
476
484
|
pass
|
|
477
485
|
|
|
478
|
-
@abc.abstractmethod
|
|
479
|
-
async def SandboxGetCommandRouterAccess(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetCommandRouterAccessRequest, modal_proto.api_pb2.SandboxGetCommandRouterAccessResponse]') -> None:
|
|
480
|
-
pass
|
|
481
|
-
|
|
482
486
|
@abc.abstractmethod
|
|
483
487
|
async def SandboxGetFromName(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxGetFromNameRequest, modal_proto.api_pb2.SandboxGetFromNameResponse]') -> None:
|
|
484
488
|
pass
|
|
@@ -608,7 +612,7 @@ class ModalClientBase(abc.ABC):
|
|
|
608
612
|
pass
|
|
609
613
|
|
|
610
614
|
@abc.abstractmethod
|
|
611
|
-
async def
|
|
615
|
+
async def TaskGetCommandRouterAccess(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.TaskGetCommandRouterAccessRequest, modal_proto.api_pb2.TaskGetCommandRouterAccessResponse]') -> None:
|
|
612
616
|
pass
|
|
613
617
|
|
|
614
618
|
@abc.abstractmethod
|
|
@@ -767,6 +771,12 @@ class ModalClientBase(abc.ABC):
|
|
|
767
771
|
modal_proto.api_pb2.AppGetOrCreateRequest,
|
|
768
772
|
modal_proto.api_pb2.AppGetOrCreateResponse,
|
|
769
773
|
),
|
|
774
|
+
'/modal.client.ModalClient/AppGetTags': grpclib.const.Handler(
|
|
775
|
+
self.AppGetTags,
|
|
776
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
777
|
+
modal_proto.api_pb2.AppGetTagsRequest,
|
|
778
|
+
modal_proto.api_pb2.AppGetTagsResponse,
|
|
779
|
+
),
|
|
770
780
|
'/modal.client.ModalClient/AppHeartbeat': grpclib.const.Handler(
|
|
771
781
|
self.AppHeartbeat,
|
|
772
782
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
@@ -803,6 +813,12 @@ class ModalClientBase(abc.ABC):
|
|
|
803
813
|
modal_proto.api_pb2.AppSetObjectsRequest,
|
|
804
814
|
google.protobuf.empty_pb2.Empty,
|
|
805
815
|
),
|
|
816
|
+
'/modal.client.ModalClient/AppSetTags': grpclib.const.Handler(
|
|
817
|
+
self.AppSetTags,
|
|
818
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
819
|
+
modal_proto.api_pb2.AppSetTagsRequest,
|
|
820
|
+
google.protobuf.empty_pb2.Empty,
|
|
821
|
+
),
|
|
806
822
|
'/modal.client.ModalClient/AppStop': grpclib.const.Handler(
|
|
807
823
|
self.AppStop,
|
|
808
824
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
@@ -1397,12 +1413,6 @@ class ModalClientBase(abc.ABC):
|
|
|
1397
1413
|
modal_proto.api_pb2.SandboxCreateConnectTokenRequest,
|
|
1398
1414
|
modal_proto.api_pb2.SandboxCreateConnectTokenResponse,
|
|
1399
1415
|
),
|
|
1400
|
-
'/modal.client.ModalClient/SandboxGetCommandRouterAccess': grpclib.const.Handler(
|
|
1401
|
-
self.SandboxGetCommandRouterAccess,
|
|
1402
|
-
grpclib.const.Cardinality.UNARY_UNARY,
|
|
1403
|
-
modal_proto.api_pb2.SandboxGetCommandRouterAccessRequest,
|
|
1404
|
-
modal_proto.api_pb2.SandboxGetCommandRouterAccessResponse,
|
|
1405
|
-
),
|
|
1406
1416
|
'/modal.client.ModalClient/SandboxGetFromName': grpclib.const.Handler(
|
|
1407
1417
|
self.SandboxGetFromName,
|
|
1408
1418
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
@@ -1595,11 +1605,11 @@ class ModalClientBase(abc.ABC):
|
|
|
1595
1605
|
google.protobuf.empty_pb2.Empty,
|
|
1596
1606
|
modal_proto.api_pb2.TaskCurrentInputsResponse,
|
|
1597
1607
|
),
|
|
1598
|
-
'/modal.client.ModalClient/
|
|
1599
|
-
self.
|
|
1608
|
+
'/modal.client.ModalClient/TaskGetCommandRouterAccess': grpclib.const.Handler(
|
|
1609
|
+
self.TaskGetCommandRouterAccess,
|
|
1600
1610
|
grpclib.const.Cardinality.UNARY_UNARY,
|
|
1601
|
-
modal_proto.api_pb2.
|
|
1602
|
-
modal_proto.api_pb2.
|
|
1611
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessRequest,
|
|
1612
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessResponse,
|
|
1603
1613
|
),
|
|
1604
1614
|
'/modal.client.ModalClient/TaskList': grpclib.const.Handler(
|
|
1605
1615
|
self.TaskList,
|
|
@@ -1811,6 +1821,12 @@ class ModalClientStub:
|
|
|
1811
1821
|
modal_proto.api_pb2.AppGetOrCreateRequest,
|
|
1812
1822
|
modal_proto.api_pb2.AppGetOrCreateResponse,
|
|
1813
1823
|
)
|
|
1824
|
+
self.AppGetTags = grpclib.client.UnaryUnaryMethod(
|
|
1825
|
+
channel,
|
|
1826
|
+
'/modal.client.ModalClient/AppGetTags',
|
|
1827
|
+
modal_proto.api_pb2.AppGetTagsRequest,
|
|
1828
|
+
modal_proto.api_pb2.AppGetTagsResponse,
|
|
1829
|
+
)
|
|
1814
1830
|
self.AppHeartbeat = grpclib.client.UnaryUnaryMethod(
|
|
1815
1831
|
channel,
|
|
1816
1832
|
'/modal.client.ModalClient/AppHeartbeat',
|
|
@@ -1847,6 +1863,12 @@ class ModalClientStub:
|
|
|
1847
1863
|
modal_proto.api_pb2.AppSetObjectsRequest,
|
|
1848
1864
|
google.protobuf.empty_pb2.Empty,
|
|
1849
1865
|
)
|
|
1866
|
+
self.AppSetTags = grpclib.client.UnaryUnaryMethod(
|
|
1867
|
+
channel,
|
|
1868
|
+
'/modal.client.ModalClient/AppSetTags',
|
|
1869
|
+
modal_proto.api_pb2.AppSetTagsRequest,
|
|
1870
|
+
google.protobuf.empty_pb2.Empty,
|
|
1871
|
+
)
|
|
1850
1872
|
self.AppStop = grpclib.client.UnaryUnaryMethod(
|
|
1851
1873
|
channel,
|
|
1852
1874
|
'/modal.client.ModalClient/AppStop',
|
|
@@ -2441,12 +2463,6 @@ class ModalClientStub:
|
|
|
2441
2463
|
modal_proto.api_pb2.SandboxCreateConnectTokenRequest,
|
|
2442
2464
|
modal_proto.api_pb2.SandboxCreateConnectTokenResponse,
|
|
2443
2465
|
)
|
|
2444
|
-
self.SandboxGetCommandRouterAccess = grpclib.client.UnaryUnaryMethod(
|
|
2445
|
-
channel,
|
|
2446
|
-
'/modal.client.ModalClient/SandboxGetCommandRouterAccess',
|
|
2447
|
-
modal_proto.api_pb2.SandboxGetCommandRouterAccessRequest,
|
|
2448
|
-
modal_proto.api_pb2.SandboxGetCommandRouterAccessResponse,
|
|
2449
|
-
)
|
|
2450
2466
|
self.SandboxGetFromName = grpclib.client.UnaryUnaryMethod(
|
|
2451
2467
|
channel,
|
|
2452
2468
|
'/modal.client.ModalClient/SandboxGetFromName',
|
|
@@ -2639,11 +2655,11 @@ class ModalClientStub:
|
|
|
2639
2655
|
google.protobuf.empty_pb2.Empty,
|
|
2640
2656
|
modal_proto.api_pb2.TaskCurrentInputsResponse,
|
|
2641
2657
|
)
|
|
2642
|
-
self.
|
|
2658
|
+
self.TaskGetCommandRouterAccess = grpclib.client.UnaryUnaryMethod(
|
|
2643
2659
|
channel,
|
|
2644
|
-
'/modal.client.ModalClient/
|
|
2645
|
-
modal_proto.api_pb2.
|
|
2646
|
-
modal_proto.api_pb2.
|
|
2660
|
+
'/modal.client.ModalClient/TaskGetCommandRouterAccess',
|
|
2661
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessRequest,
|
|
2662
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessResponse,
|
|
2647
2663
|
)
|
|
2648
2664
|
self.TaskList = grpclib.client.UnaryUnaryMethod(
|
|
2649
2665
|
channel,
|