modAL 1.4.4.dev8__py3-none-any.whl → 1.4.4.dev9__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 CHANGED
@@ -35,7 +35,7 @@ class _Client:
35
35
  server_url: str,
36
36
  client_type: int,
37
37
  credentials: typing.Optional[tuple[str, str]],
38
- version: str = "1.4.4.dev8",
38
+ version: str = "1.4.4.dev9",
39
39
  ):
40
40
  """mdmd:hidden
41
41
  The Modal client object is not intended to be instantiated directly by users.
@@ -175,7 +175,7 @@ class Client:
175
175
  server_url: str,
176
176
  client_type: int,
177
177
  credentials: typing.Optional[tuple[str, str]],
178
- version: str = "1.4.4.dev8",
178
+ version: str = "1.4.4.dev9",
179
179
  ):
180
180
  """mdmd:hidden
181
181
  The Modal client object is not intended to be instantiated directly by users.
modal/sandbox.py CHANGED
@@ -695,7 +695,7 @@ class _Sandbox(_Object, type_prefix="sb"):
695
695
  cloud: Optional[str] = None,
696
696
  region: Optional[Union[str, Sequence[str]]] = None,
697
697
  block_network: bool = False,
698
- cidr_allowlist: Optional[Sequence[str]] = None,
698
+ outbound_cidr_allowlist: Optional[Sequence[str]] = None,
699
699
  inbound_cidr_allowlist: Optional[Sequence[str]] = None,
700
700
  volumes: dict[Union[str, os.PathLike], Union[_Volume, _CloudBucketMount]] = {},
701
701
  pty: bool = False,
@@ -773,21 +773,21 @@ class _Sandbox(_Object, type_prefix="sb"):
773
773
  )
774
774
 
775
775
  if block_network:
776
- if cidr_allowlist is not None:
777
- raise InvalidError("`cidr_allowlist` cannot be used when `block_network` is enabled")
776
+ if outbound_cidr_allowlist is not None:
777
+ raise InvalidError("`outbound_cidr_allowlist` cannot be used when `block_network` is enabled")
778
778
  if inbound_cidr_allowlist is not None:
779
779
  raise InvalidError("`inbound_cidr_allowlist` cannot be used when `block_network` is enabled")
780
780
  network_access = api_pb2.NetworkAccess(
781
781
  network_access_type=api_pb2.NetworkAccess.NetworkAccessType.BLOCKED,
782
782
  )
783
- elif cidr_allowlist is None:
783
+ elif outbound_cidr_allowlist is None:
784
784
  network_access = api_pb2.NetworkAccess(
785
785
  network_access_type=api_pb2.NetworkAccess.NetworkAccessType.OPEN,
786
786
  )
787
787
  else:
788
788
  network_access = api_pb2.NetworkAccess(
789
789
  network_access_type=api_pb2.NetworkAccess.NetworkAccessType.ALLOWLIST,
790
- allowed_cidrs=cidr_allowlist,
790
+ allowed_cidrs=outbound_cidr_allowlist,
791
791
  )
792
792
 
793
793
  async def _load(
@@ -1661,6 +1661,10 @@ class _Sandbox(_Object, type_prefix="sb"):
1661
1661
  sandbox_name_override=name,
1662
1662
  sandbox_name_override_type=api_pb2.SandboxRestoreRequest.SANDBOX_NAME_OVERRIDE_TYPE_STRING,
1663
1663
  )
1664
+ # Pin the restored Sandbox to a specific worker when MODAL_WORKER_ID is
1665
+ # set.
1666
+ if worker_id := config.get("worker_id"):
1667
+ restore_req.worker_id = worker_id
1664
1668
  restore_resp: api_pb2.SandboxRestoreResponse = await client.stub.SandboxRestore(restore_req)
1665
1669
 
1666
1670
  sandbox = await _Sandbox.from_id(restore_resp.sandbox_id, client)
modal/sandbox.pyi CHANGED
@@ -323,7 +323,7 @@ class _Sandbox(modal._object._Object):
323
323
  cloud: typing.Optional[str] = None,
324
324
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
325
325
  block_network: bool = False,
326
- cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
326
+ outbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
327
327
  inbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
328
328
  volumes: dict[
329
329
  typing.Union[str, os.PathLike],
@@ -1272,7 +1272,7 @@ class Sandbox(modal.object.Object):
1272
1272
  cloud: typing.Optional[str] = None,
1273
1273
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
1274
1274
  block_network: bool = False,
1275
- cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1275
+ outbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1276
1276
  inbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1277
1277
  volumes: dict[
1278
1278
  typing.Union[str, os.PathLike],
@@ -1320,7 +1320,7 @@ class Sandbox(modal.object.Object):
1320
1320
  cloud: typing.Optional[str] = None,
1321
1321
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
1322
1322
  block_network: bool = False,
1323
- cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1323
+ outbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1324
1324
  inbound_cidr_allowlist: typing.Optional[collections.abc.Sequence[str]] = None,
1325
1325
  volumes: dict[
1326
1326
  typing.Union[str, os.PathLike],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.4.4.dev8
3
+ Version: 1.4.4.dev9
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License-Expression: Apache-2.0
@@ -28,7 +28,7 @@ modal/app.pyi,sha256=KgYfkXXrwF31zvS0U-O3gpLCyPf-aenwOg_g97eMSoA,54010
28
28
  modal/billing.py,sha256=B2zXa7KeMnpqi2AQINycEk-KSXVYaLTTTAQTtuf2Gfs,257
29
29
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
30
30
  modal/client.py,sha256=jjT4eLFHGcvIF6Xw4kPptIx-VmExtphRN8XJ1JA7fWI,15502
31
- modal/client.pyi,sha256=WUA0I1OfCbHYE9Au3nuKfYoNfTEvM58qCcnSXowZsPg,15701
31
+ modal/client.pyi,sha256=9w1F7-R6ykicM8C30-liTCsgnNEhlKktN6cd8jGXWNo,15701
32
32
  modal/cloud_bucket_mount.py,sha256=KkaJVy5vpO_u2NtDYtv1JM-M3y4J0UtWBapTDKpQRcA,6034
33
33
  modal/cloud_bucket_mount.pyi,sha256=mGDeEd1XvxGpCE6O5jRBSfIvMXvZ5AtIybea5k-0w9w,7560
34
34
  modal/cls.py,sha256=UTtp9W3SuFIbkYEE2D94SUzKiMXM5BYgfHGzBQD6CEk,38304
@@ -70,8 +70,8 @@ modal/retries.py,sha256=vPWWKP-FRolJwTBuLPXdWqHV7aJfSQFgEW7vhlBBXRQ,5067
70
70
  modal/runner.py,sha256=GLx_JwZ2hpA5yuHMY2b2Gt8Ri-KxJZHF2Zp1N_qVLD4,30144
71
71
  modal/runner.pyi,sha256=7QHbZawq1P5N9DiSrrEYtXtBCDAWlRibNonBO0q6MdM,9570
72
72
  modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
73
- modal/sandbox.py,sha256=eKNQJ6iRnsGnJHgnNA785H9a8-05qS4R648r4eAuz88,89397
74
- modal/sandbox.pyi,sha256=vXEcf0TVoS-5NfQMVxxdJf_psCAKY4ZtDNP_TH0UcX8,91119
73
+ modal/sandbox.py,sha256=ooZV029TmvYDUuWyj0hCax6CT0M_4e2uJGDjhVIKtss,89632
74
+ modal/sandbox.pyi,sha256=wBeWA9t51tGdWQtbPbR0MsRAydtzQw95uRyTNP1dezQ,91146
75
75
  modal/sandbox_fs.py,sha256=RmkXSRI27PA-xoUeYgg31oDsIIRctUIVwzjjM76mvIY,22677
76
76
  modal/sandbox_fs.pyi,sha256=ATdPtiJTCU-qaS8X59zJQc36fOL6-m14599E1UL8Zz0,35391
77
77
  modal/schedule.py,sha256=ng0g0AqNY5GQI9KhkXZQ5Wam5G42glbkqVQsNpBtbDE,3078
@@ -178,7 +178,7 @@ modal/experimental/__init__.py,sha256=Wb1YoAKAnNxH_0c2wA0T12I7bSu9PSO2nS_LuLska7
178
178
  modal/experimental/flash.py,sha256=3k7Co0JrrVMjUQxTmi1VPXJX4jgRWetlAJnwm_kxhqg,34301
179
179
  modal/experimental/flash.pyi,sha256=lpTqJFZRMGWscw0xpYZVdBMnAYjj16asXE4_64A6itQ,17774
180
180
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
181
- modal-1.4.4.dev8.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
181
+ modal-1.4.4.dev9.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
182
182
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
183
183
  modal_docs/gen_cli_docs.py,sha256=bfUSLscHfoQoKkKjIqJvQMe3fURzqcQK7gF1h9WQLtM,3742
184
184
  modal_docs/gen_cli_docs_main.py,sha256=UPGr7O1DYTIRLwfINe2rbdh89J3cPVTU1OWL-SjxnOQ,198
@@ -189,21 +189,21 @@ modal_docs/mdmd/mdmd.py,sha256=z9T3lMktTq3N4r6T6MSSyw8lebbqKc3Igw8l9EdMJNM,9998
189
189
  modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
190
190
  modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
191
191
  modal_proto/api_grpc.py,sha256=XR3Roql3A9T8ADCLVtB9K7gI9BpdU3wUti7GXfb416o,155400
192
- modal_proto/api_pb2.py,sha256=WsyOxBtAOYEY5LXZuW9wYB3cbMDRbdijrvlqhmjXjc0,438104
193
- modal_proto/api_pb2.pyi,sha256=OghjEzuPrMJkQHYr_RDhJ2fjaSPJAaFMpUfJAjSf9Io,613767
192
+ modal_proto/api_pb2.py,sha256=W0iDDaFdh09Zel6A9XVZnNklpLnFCIFapfb1hx49wZM,438141
193
+ modal_proto/api_pb2.pyi,sha256=3G7qUAD7CGwzHH-L-vHg4nSeL85BjCifdhArYTRpGi4,614015
194
194
  modal_proto/api_pb2_grpc.py,sha256=F9j1jMfVDXpzgo8341GdvdwclTI8iCyi-yFpWtwM11s,334754
195
195
  modal_proto/api_pb2_grpc.pyi,sha256=lXX9bu15Bn2rPrTnTky26gZgB2LBHyYRc4LmfcitJEc,78171
196
196
  modal_proto/modal_api_grpc.py,sha256=6rZCAcGpgkzO6Sms-1-3fEoB0QBqJwH8t_VgXX8k6ec,24517
197
197
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
198
198
  modal_proto/task_command_router_grpc.py,sha256=VWwYwMSfCt7Yy-u8RNrr3swODsBvUw2FyYczbw-wuwo,17438
199
- modal_proto/task_command_router_pb2.py,sha256=-K4H-C7N-ILpdvFyM4PQMZcGZvXV1J89mfycupxxCvU,33745
200
- modal_proto/task_command_router_pb2.pyi,sha256=KNM7lPtngiv0_Ni_1zRg1rl65ynyjN8vpzd3XISxMGo,37281
199
+ modal_proto/task_command_router_pb2.py,sha256=MwpCEK7AmBdImEdte8dpiTeoGEeCbsMHU8ykJLhGBAQ,33792
200
+ modal_proto/task_command_router_pb2.pyi,sha256=Z0ZbX63DJwqHDOvaXFDMuqiG_UBfjv0XXRtCZL27rtc,37446
201
201
  modal_proto/task_command_router_pb2_grpc.py,sha256=368j8b_h19L7bidFTRGSdSG4bK0zU9Y_Oq46_B2ACDg,34666
202
202
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=PbzkCj-uSlN1inYSdhncPQ1-04vhBnj3Wzvb-D2pLHY,11226
203
- modal_version/__init__.py,sha256=-QYB0OB3-MFO-bxkFMDgdqFdDY6mByoO9cgSi26Y1HU,120
203
+ modal_version/__init__.py,sha256=Lz8My_bjy1LofIwqgP-7miFF119DyImQl-_n3fekhlo,120
204
204
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
205
- modal-1.4.4.dev8.dist-info/METADATA,sha256=0txUaxhuST31P84xhfU-vPLoLhjvX4WKK2V_6vjcgP8,2338
206
- modal-1.4.4.dev8.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
207
- modal-1.4.4.dev8.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
208
- modal-1.4.4.dev8.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
209
- modal-1.4.4.dev8.dist-info/RECORD,,
205
+ modal-1.4.4.dev9.dist-info/METADATA,sha256=0a0kbzGhvFQB0watkSrgtshbufaWIizlDS8Dm0_xn0g,2338
206
+ modal-1.4.4.dev9.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
207
+ modal-1.4.4.dev9.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
208
+ modal-1.4.4.dev9.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
209
+ modal-1.4.4.dev9.dist-info/RECORD,,