modAL 1.2.7.dev3__py3-none-any.whl → 1.2.7.dev4__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.
@@ -991,12 +991,10 @@ class _ContainerIOManager:
991
991
  # Busy-wait for restore. `/__modal/restore-state.json` is created
992
992
  # by the worker process with updates to the container config.
993
993
  restored_path = Path(config.get("restore_state_path"))
994
- start = time.perf_counter()
994
+ logger.debug("Waiting for restore")
995
995
  while not restored_path.exists():
996
- logger.debug(f"Waiting for restore (elapsed={time.perf_counter() - start:.3f}s)")
997
996
  await asyncio.sleep(0.01)
998
997
  continue
999
-
1000
998
  logger.debug("Container: restored")
1001
999
 
1002
1000
  # Look for state file and create new client with updated credentials.
@@ -18,11 +18,14 @@ from modal.config import config, logger
18
18
 
19
19
  CUDA_CHECKPOINT_PATH: str = config.get("cuda_checkpoint_path")
20
20
 
21
- # Maximum total duration for an entire toggle operation.
22
- CUDA_CHECKPOINT_TOGGLE_TIMEOUT: float = 5 * 60.0
23
-
24
21
  # Maximum total duration for each individual `cuda-checkpoint` invocation.
25
- CUDA_CHECKPOINT_TIMEOUT: float = 90
22
+ CUDA_CHECKPOINT_TIMEOUT: float = 3 * 60.0
23
+
24
+ # Number of retries for each individual `cuda-checkpoint --toggle` invocation.
25
+ CUDA_CHECKPOINT_TOGGLE_NUM_RETRIES: int = 3
26
+
27
+ # Maximum total duration for an entire toggle operation.
28
+ CUDA_CHECKPOINT_TOGGLE_TIMEOUT: float = CUDA_CHECKPOINT_TOGGLE_NUM_RETRIES * CUDA_CHECKPOINT_TIMEOUT
26
29
 
27
30
 
28
31
  class CudaCheckpointState(Enum):
@@ -58,7 +61,7 @@ class CudaCheckpointProcess:
58
61
 
59
62
  start_time = time.monotonic()
60
63
  retry_count = 0
61
- max_retries = 3
64
+ max_retries = CUDA_CHECKPOINT_TOGGLE_NUM_RETRIES
62
65
 
63
66
  attempts = 0
64
67
  while self._should_continue_toggle(
@@ -201,8 +204,7 @@ class CudaCheckpointSession:
201
204
  [CUDA_CHECKPOINT_PATH, "--get-state", "--pid", str(pid)],
202
205
  capture_output=True,
203
206
  text=True,
204
- # This should be quick since no checkpoint has taken place yet
205
- timeout=5,
207
+ timeout=CUDA_CHECKPOINT_TIMEOUT,
206
208
  )
207
209
 
208
210
  # If the command succeeds (return code 0), this PID has a CUDA session
modal/client.pyi CHANGED
@@ -32,7 +32,7 @@ class _Client:
32
32
  server_url: str,
33
33
  client_type: int,
34
34
  credentials: typing.Optional[tuple[str, str]],
35
- version: str = "1.2.7.dev3",
35
+ version: str = "1.2.7.dev4",
36
36
  ):
37
37
  """mdmd:hidden
38
38
  The Modal client object is not intended to be instantiated directly by users.
@@ -163,7 +163,7 @@ class Client:
163
163
  server_url: str,
164
164
  client_type: int,
165
165
  credentials: typing.Optional[tuple[str, str]],
166
- version: str = "1.2.7.dev3",
166
+ version: str = "1.2.7.dev4",
167
167
  ):
168
168
  """mdmd:hidden
169
169
  The Modal client object is not intended to be instantiated directly by users.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.7.dev3
3
+ Version: 1.2.7.dev4
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -26,7 +26,7 @@ modal/app.pyi,sha256=nI_Tibj-rI5I7dJFJnczbHvcmVzCvvCih0tMzoQlr_Y,50835
26
26
  modal/billing.py,sha256=zmQ3bcCJlwa4KD1IA_QgdWpm1pn13c-7qfy79iEauYI,195
27
27
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
28
28
  modal/client.py,sha256=k1CqQ_0t4-vHylkqYZgYCnClg-FT0QrTPAKivL01A_k,14354
29
- modal/client.pyi,sha256=_-dhpL8EJ0oG054KPN-3i-cmMKAH0jg4mMhFsKEi2B8,13146
29
+ modal/client.pyi,sha256=734shLJvmH-fQ2drFAkMLbRAd67Bj61OZCOIETsIBFo,13146
30
30
  modal/cloud_bucket_mount.py,sha256=cvVj5Rt4nDHoQbTneoJPTaAcnl_Ab_mrsjnnzd0v9OI,6013
31
31
  modal/cloud_bucket_mount.pyi,sha256=vXusGMOUk9HjCs4lhxteuCK4xLQclPfugGWKo7LECEA,7539
32
32
  modal/cls.py,sha256=PIGe4ED28jcxC2HeKtMD3odMIb4qNmlRt3tj1dZstRo,41738
@@ -86,11 +86,11 @@ modal/volume.py,sha256=ZHVR31U7vzz1hV7EP6v7JQWGr7890FiST71mZh272fg,52310
86
86
  modal/volume.pyi,sha256=sBnG6t4aPjH09vlo63S-k4915uz5VNycE-JPgUjwDs8,53335
87
87
  modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
88
88
  modal/_runtime/asgi.py,sha256=AOcduIlijmlxhXVWo7AIUhigo-bqm6nDkHj4Q4JLy6o,22607
89
- modal/_runtime/container_io_manager.py,sha256=ScQKrWYV1UN0VFFc9tlQqWGpl-joFefkffagwncZWwM,52065
89
+ modal/_runtime/container_io_manager.py,sha256=pmPQJ66Nb8Sa-8CbAMXdjxyBPhDmZMOs-dpFlFpuoas,51978
90
90
  modal/_runtime/container_io_manager.pyi,sha256=GDNLirCcPMRc6gckInYKmGmJZY3LNcgUVXKftt9P9jI,23493
91
91
  modal/_runtime/execution_context.py,sha256=AYrNQRHHXEqX2MwMf8zxelKZnYf25RE_B-NRLWf93n8,3521
92
92
  modal/_runtime/execution_context.pyi,sha256=FVzakehz72ndL-ufe8-EC7TM4IHO_MEBcAdgWuU4W9k,2426
93
- modal/_runtime/gpu_memory_snapshot.py,sha256=8T85kyfGJ11AnhFRCZTeWj9zin9e9f5XbrRqU8_WjAk,11955
93
+ modal/_runtime/gpu_memory_snapshot.py,sha256=vRLzSVZckD7xYjahrXlRPExuoOdDwTTKIaEMsWDTrzM,12113
94
94
  modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5163
95
95
  modal/_runtime/user_code_event_loop.py,sha256=HwOuDyCZLOakr_DG7p2MrcscjSQNheIhBBuLgB5I3Cc,3014
96
96
  modal/_runtime/user_code_imports.py,sha256=_6uHDfTpqCcspHpgjNV14uMyiGdWkAHU7zqHfUx9uzU,25997
@@ -158,7 +158,7 @@ modal/experimental/__init__.py,sha256=GOuo3t4-Le0ZVddiHIOw0MQxkdTJge-bVbhDvgnblm
158
158
  modal/experimental/flash.py,sha256=GJZwSr-4OHlP6gCIZdcbsSb8D8WX9xJwMphjwcfsRoU,31262
159
159
  modal/experimental/flash.pyi,sha256=q4a3mdgL0jzATPL2tS7LpuyulYzF1vUSE453S9xc8n8,16965
160
160
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
161
- modal-1.2.7.dev3.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
161
+ modal-1.2.7.dev4.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
162
162
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
163
163
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
164
164
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -180,10 +180,10 @@ modal_proto/task_command_router_pb2.py,sha256=2Y8wRvnq4_7RiQ-5ZAPIgXaxrHv_MXzgS5
180
180
  modal_proto/task_command_router_pb2.pyi,sha256=yI4tFteErLlonFA2HyaWtONfhY_VGSe7KCWFIspvmkE,16323
181
181
  modal_proto/task_command_router_pb2_grpc.py,sha256=q2VWfK2-4uDcPaPLhAqPZkgxhuQRYnWmwUcnEbPbGuk,13895
182
182
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=e1MM10VGUgDkm041v53QeTglGQPzTpA0FUsFtezjp74,4536
183
- modal_version/__init__.py,sha256=fA20E7rAOvVUR9iV9Y9n6hICkzzVh-m5OVOkKklqXIA,120
183
+ modal_version/__init__.py,sha256=4npBp1DBbQA1cZeYqKAPJUqaPC68izm7-DFOCQL6EbI,120
184
184
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
185
- modal-1.2.7.dev3.dist-info/METADATA,sha256=bP_IAeF4zyxielw-DCT1Oj6xrWvBRPkxIMR_vDRhiGk,2491
186
- modal-1.2.7.dev3.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
187
- modal-1.2.7.dev3.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
188
- modal-1.2.7.dev3.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
189
- modal-1.2.7.dev3.dist-info/RECORD,,
185
+ modal-1.2.7.dev4.dist-info/METADATA,sha256=EkXxVOnaCrn1LO-BbQTWLCARi7BvQDaSae1U1C_6v4g,2491
186
+ modal-1.2.7.dev4.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
187
+ modal-1.2.7.dev4.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
188
+ modal-1.2.7.dev4.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
189
+ modal-1.2.7.dev4.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.2.7.dev3"
4
+ __version__ = "1.2.7.dev4"