modal 0.74.3__py3-none-any.whl → 0.74.4__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/client.pyi +2 -2
- modal/io_streams.py +20 -7
- modal/io_streams.pyi +2 -2
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/METADATA +1 -1
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/WHEEL +0 -0
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/entry_points.txt +0 -0
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.3.dist-info → modal-0.74.4.dist-info}/top_level.txt +0 -0
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.74.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.4"
|
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.74.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.74.4"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/io_streams.py
CHANGED
@@ -46,17 +46,24 @@ async def _sandbox_logs_iterator(
|
|
46
46
|
|
47
47
|
|
48
48
|
async def _container_process_logs_iterator(
|
49
|
-
process_id: str,
|
50
|
-
|
49
|
+
process_id: str,
|
50
|
+
file_descriptor: "api_pb2.FileDescriptor.ValueType",
|
51
|
+
client: _Client,
|
52
|
+
last_index: int,
|
53
|
+
) -> AsyncGenerator[tuple[Optional[bytes], int], None]:
|
51
54
|
req = api_pb2.ContainerExecGetOutputRequest(
|
52
|
-
exec_id=process_id,
|
55
|
+
exec_id=process_id,
|
56
|
+
timeout=55,
|
57
|
+
file_descriptor=file_descriptor,
|
58
|
+
get_raw_bytes=True,
|
59
|
+
last_batch_index=last_index,
|
53
60
|
)
|
54
61
|
async for batch in client.stub.ContainerExecGetOutput.unary_stream(req):
|
55
62
|
if batch.HasField("exit_code"):
|
56
|
-
yield None
|
63
|
+
yield None, batch.batch_index
|
57
64
|
break
|
58
65
|
for item in batch.items:
|
59
|
-
yield item.message_bytes
|
66
|
+
yield item.message_bytes, batch.batch_index
|
60
67
|
|
61
68
|
|
62
69
|
T = TypeVar("T", str, bytes)
|
@@ -178,18 +185,24 @@ class _StreamReader(Generic[T]):
|
|
178
185
|
|
179
186
|
completed = False
|
180
187
|
retries_remaining = 10
|
188
|
+
last_index = 0
|
181
189
|
while not completed:
|
182
190
|
try:
|
183
|
-
iterator = _container_process_logs_iterator(
|
191
|
+
iterator = _container_process_logs_iterator(
|
192
|
+
self._object_id, self._file_descriptor, self._client, last_index
|
193
|
+
)
|
184
194
|
|
185
|
-
async for message in iterator:
|
195
|
+
async for message, batch_index in iterator:
|
186
196
|
if self._stream_type == StreamType.STDOUT and message:
|
187
197
|
print(message.decode("utf-8"), end="")
|
188
198
|
elif self._stream_type == StreamType.PIPE:
|
189
199
|
self._container_process_buffer.append(message)
|
200
|
+
|
190
201
|
if message is None:
|
191
202
|
completed = True
|
192
203
|
break
|
204
|
+
else:
|
205
|
+
last_index = batch_index
|
193
206
|
|
194
207
|
except (GRPCError, StreamTerminatedError, ClientClosed) as exc:
|
195
208
|
if retries_remaining > 0:
|
modal/io_streams.pyi
CHANGED
@@ -8,8 +8,8 @@ def _sandbox_logs_iterator(
|
|
8
8
|
sandbox_id: str, file_descriptor: int, last_entry_id: str, client: modal.client._Client
|
9
9
|
) -> collections.abc.AsyncGenerator[tuple[typing.Optional[bytes], str], None]: ...
|
10
10
|
def _container_process_logs_iterator(
|
11
|
-
process_id: str, file_descriptor: int, client: modal.client._Client
|
12
|
-
) -> collections.abc.AsyncGenerator[typing.Optional[bytes], None]: ...
|
11
|
+
process_id: str, file_descriptor: int, client: modal.client._Client, last_index: int
|
12
|
+
) -> collections.abc.AsyncGenerator[tuple[typing.Optional[bytes], int], None]: ...
|
13
13
|
|
14
14
|
T = typing.TypeVar("T")
|
15
15
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=4EeD3MXXpaeSFatuWt80xGbMH9cSYS3b9m9z3PQDlwU,48144
|
|
22
22
|
modal/app.pyi,sha256=SkqXNrdnGIZ4MmNNvpGtzNLoUdyuvi9IjQQR_DRiRHk,26968
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=U-YKSw0n7J1ZLREt9cbEJCtmHe5YoPKFxl0xlkan2yc,15565
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=tgHoTQQZUbWjQ_Kl3tjzbxrIfuOrLjs2zBTUCGvn7DA,7591
|
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=GvaNl8R5UsH7Vg88WEOyerdjvZEPK7xxi3nqHlyOW_c,33497
|
@@ -43,8 +43,8 @@ modal/functions.pyi,sha256=Bg_zlYSHMYuEXQYLcFU-j1Kwq5zHQ9jggMA_5ZO_du8,14785
|
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
44
|
modal/image.py,sha256=I-9_YZL0SSfnuGPywa3-4PlxDmJ-53p7ce3gP74SrOA,92877
|
45
45
|
modal/image.pyi,sha256=89zv12C1sFrJs7Es9SnX23_m208ASAdeNGCVTrhjzHI,25632
|
46
|
-
modal/io_streams.py,sha256=
|
47
|
-
modal/io_streams.pyi,sha256=
|
46
|
+
modal/io_streams.py,sha256=YDZVQSDv05DeXg5TwcucC9Rj5hQBx2GXdluan9rIUpw,15467
|
47
|
+
modal/io_streams.pyi,sha256=RpXIWFm6fQkLJRc1uxd0KkQ2wTLCB65jRlyGplU6CQE,5100
|
48
48
|
modal/mount.py,sha256=_v1VYxryY3BcF4XxyRfOWm7AxAz79D2VRWh5tOHhWuc,31945
|
49
49
|
modal/mount.pyi,sha256=CmHa7zKSxHA_7-vMQLnGfw_ZXvAvHlafvUEVJcQ1LQA,12535
|
50
50
|
modal/network_file_system.py,sha256=WXdyL7du_fvjvuG6hSAREyJ83sSEP2xSLAIAhBsisdI,14869
|
@@ -145,7 +145,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
|
|
145
145
|
modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
|
146
146
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
147
147
|
modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
|
148
|
-
modal-0.74.
|
148
|
+
modal-0.74.4.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
149
149
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
150
150
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
151
151
|
modal_docs/gen_reference_docs.py,sha256=cvTgltucqYLLIX84QxAwf51Z5Vc2n6cLxS8VcrxNCAo,6401
|
@@ -170,9 +170,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
170
170
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
171
|
modal_version/__init__.py,sha256=m94xZNWIjH8oUtJk4l9xfovzDJede2o7X-q0MHVECtM,470
|
172
172
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
173
|
-
modal_version/_version_generated.py,sha256=
|
174
|
-
modal-0.74.
|
175
|
-
modal-0.74.
|
176
|
-
modal-0.74.
|
177
|
-
modal-0.74.
|
178
|
-
modal-0.74.
|
173
|
+
modal_version/_version_generated.py,sha256=bYiSkovcdFeThoXyrhKIWjsl4iNeG2BueXSU9CxJjTY,148
|
174
|
+
modal-0.74.4.dist-info/METADATA,sha256=Argyod3443uQP384NJ1URtdoRT7BzREl1o6hJvSvti0,2473
|
175
|
+
modal-0.74.4.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-0.74.4.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-0.74.4.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-0.74.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|