modal 0.73.12__py3-none-any.whl → 0.73.14__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/_output.py CHANGED
@@ -291,7 +291,9 @@ class OutputManager:
291
291
 
292
292
  # The most advanced state that's present informs the message.
293
293
  if api_pb2.TASK_STATE_ACTIVE in states_set or api_pb2.TASK_STATE_IDLE in states_set:
294
- tasks_running = tasks_at_state(api_pb2.TASK_STATE_ACTIVE)
294
+ # Note that as of writing the server no longer uses TASK_STATE_ACTIVE, but we'll
295
+ # make the numerator the sum of active / idle in case that is revived at some point in the future.
296
+ tasks_running = tasks_at_state(api_pb2.TASK_STATE_ACTIVE) + tasks_at_state(api_pb2.TASK_STATE_IDLE)
295
297
  tasks_not_completed = len(self._task_states) - tasks_at_state(api_pb2.TASK_STATE_COMPLETED)
296
298
  message = f"Running ({tasks_running}/{tasks_not_completed} containers active)..."
297
299
  elif api_pb2.TASK_STATE_LOADING_IMAGE in states_set:
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.12"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.14"
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.12"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.14"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/functions.pyi CHANGED
@@ -200,11 +200,11 @@ class Function(
200
200
 
201
201
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
202
202
 
203
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
203
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
204
204
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
205
205
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
206
206
 
207
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
207
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
208
208
 
209
209
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
210
210
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -219,19 +219,19 @@ class Function(
219
219
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
220
220
  ) -> modal._functions.OriginalReturnType: ...
221
221
 
222
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
222
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
223
223
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
224
224
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
225
225
 
226
226
  _experimental_spawn: ___experimental_spawn_spec[
227
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
227
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
228
228
  ]
229
229
 
230
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
230
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
231
231
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
232
232
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
233
233
 
234
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
234
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
235
235
 
236
236
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
237
237
 
modal/gpu.py CHANGED
@@ -12,14 +12,12 @@ class _GPUConfig:
12
12
  type: "api_pb2.GPUType.V" # Deprecated, at some point
13
13
  count: int
14
14
  gpu_type: str
15
- memory: int = 0
16
15
 
17
16
  def _to_proto(self) -> api_pb2.GPUConfig:
18
17
  """Convert this GPU config to an internal protobuf representation."""
19
18
  return api_pb2.GPUConfig(
20
19
  type=self.type,
21
20
  count=self.count,
22
- memory=self.memory,
23
21
  gpu_type=self.gpu_type,
24
22
  )
25
23
 
@@ -73,17 +71,14 @@ class A100(_GPUConfig):
73
71
  size: Union[str, None] = None, # Select GB configuration of GPU device: "40GB" or "80GB". Defaults to "40GB".
74
72
  ):
75
73
  if size == "40GB" or not size:
76
- super().__init__(api_pb2.GPU_TYPE_A100, count, "A100-40GB", 40)
74
+ super().__init__(api_pb2.GPU_TYPE_A100, count, "A100-40GB")
77
75
  elif size == "80GB":
78
- super().__init__(api_pb2.GPU_TYPE_A100_80GB, count, "A100-80GB", 80)
76
+ super().__init__(api_pb2.GPU_TYPE_A100_80GB, count, "A100-80GB")
79
77
  else:
80
78
  raise ValueError(f"size='{size}' is invalid. A100s can only have memory values of 40GB or 80GB.")
81
79
 
82
80
  def __repr__(self):
83
- if self.memory == 80:
84
- return f"GPU(A100-80GB, count={self.count})"
85
- else:
86
- return f"GPU(A100-40GB, count={self.count})"
81
+ return f"GPU({self.gpu_type}, count={self.count})"
87
82
 
88
83
 
89
84
  class A10G(_GPUConfig):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modal
3
- Version: 0.73.12
3
+ Version: 0.73.14
4
4
  Summary: Python client library for Modal
5
5
  Author: Modal Labs
6
6
  Author-email: support@modal.com
@@ -7,7 +7,7 @@ modal/_functions.py,sha256=Yv8hutin0R_0ZRvUZm8kcjVMf4CNAckgMSDpbLSUl0E,71593
7
7
  modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
8
8
  modal/_location.py,sha256=S3lSxIU3h9HkWpkJ3Pwo0pqjIOSB1fjeSgUsY3x7eec,1202
9
9
  modal/_object.py,sha256=ItQcsMNkz9Y3kdTsvfNarbW-paJ2qabDyQ7njaqY0XI,11359
10
- modal/_output.py,sha256=0fWX_KQwhER--U81ys16CL-pA5A-LN20C0EZjElKGJQ,25410
10
+ modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
11
11
  modal/_proxy_tunnel.py,sha256=gnKyCfmVB7x2d1A6c-JDysNIP3kEFxmXzhcXhPrzPn0,1906
12
12
  modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
13
13
  modal/_resolver.py,sha256=D9IAdZKNqRPwgPDaB-XMKGtO8G0GwtBzG6xdgiXKdCk,6945
@@ -21,7 +21,7 @@ modal/app.py,sha256=MaWCYgNx8y2GQhmaXQBMKKAAfCYfdxrdYs6zCBoJzwI,44628
21
21
  modal/app.pyi,sha256=lxiuWzE_OLb3WHg-H7Pek9DGBuCUzZ55P594VhJL5LA,26113
22
22
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
23
23
  modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
24
- modal/client.pyi,sha256=--MgDdVKPggxp3WXcqEGQZrKCma-33TxbGun6l1nnaE,7593
24
+ modal/client.pyi,sha256=H_8t2bPE4cECyfl59Ilt_W4IDHwzcv6PMaWVHDdkh0A,7593
25
25
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
26
26
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
27
27
  modal/cls.py,sha256=kNnZrBYVXOhgEXU0rDWk2Hr-bQRrsZkMKDgC-TD_6Bs,31063
@@ -40,8 +40,8 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
40
40
  modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
41
41
  modal/file_pattern_matcher.py,sha256=1cZ4V2wSLiaXqAqStETSwp3bzDD6QZOt6pmmjk3Okz4,6505
42
42
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
43
- modal/functions.pyi,sha256=avRIY0KOFky6tDRI5_SvnLXz7PUnG2H0hQA385cRtb0,14289
44
- modal/gpu.py,sha256=2qZMNnoMrjU-5Bu7fx68pANUAKTtZq0EWEEeBA9OUVQ,7426
43
+ modal/functions.pyi,sha256=YflJx4BhzmJLJzpVWbuAMv0Qv63Mgb3r9qZqrgBEr1w,14289
44
+ modal/gpu.py,sha256=emiPRWAgr10f5twtUhC3kBZQZ91fZ74VNdePy7YAspE,7267
45
45
  modal/image.py,sha256=ekE2693foy30Xi1LM3swKZPW6HuaACj-OBvfspVSyIE,91509
46
46
  modal/image.pyi,sha256=kdJzy1eaxNPZeCpE0TMYYLhJ6UWmkfRDeb_vzngJUoQ,26462
47
47
  modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
@@ -154,10 +154,10 @@ modal_global_objects/mounts/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0
154
154
  modal_global_objects/mounts/modal_client_package.py,sha256=W0E_yShsRojPzWm6LtIQqNVolapdnrZkm2hVEQuZK_4,767
155
155
  modal_global_objects/mounts/python_standalone.py,sha256=EsC-hdPtiAPOwgW9emHN6muNUkrJwR8dYxroVArxHxM,1841
156
156
  modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
157
- modal_proto/api.proto,sha256=_RV_hQIWR_CmanZcjieKll-P9P5qVsRDDS7TtGWL4AU,85264
157
+ modal_proto/api.proto,sha256=0sTvOLxxQPMLMLN5YDreXf8KhLhZF3xDOBDkz3wnmdI,85243
158
158
  modal_proto/api_grpc.py,sha256=FYGqDegM_w_qxdtlxum8k31mDibKoMvmNxv_p9cKdKs,109056
159
- modal_proto/api_pb2.py,sha256=7hj3Dqmv3Xb6nEzLVMt-zai1EGqUT5uAU5nbGjnk85A,311104
160
- modal_proto/api_pb2.pyi,sha256=ScYf3xdzV3TQZZR-uPusjrEHoHIxKCRPseS7e8Ee_EI,415384
159
+ modal_proto/api_pb2.py,sha256=XQDiHbY5FwTt4y_mdFnGmKajgRk8ABhDygcdZQ-FDWw,311068
160
+ modal_proto/api_pb2.pyi,sha256=InI2402-j9scYBCnlNTFSb8lmstfGeUqNar-2IteJdQ,415264
161
161
  modal_proto/api_pb2_grpc.py,sha256=DNp0Et5i_Ey4dKx_1o1LRtYhyWYyT0NzTcAY4EcHn-c,235765
162
162
  modal_proto/api_pb2_grpc.pyi,sha256=RI6tWC3L8EIN4-izFSEGPPJl5Ta0lXPNuHUJaWAr35s,54892
163
163
  modal_proto/modal_api_grpc.py,sha256=UG8WJU81afrWPwItWB4Ag64E9EpyREMpBbAVGVEYJiM,14550
@@ -171,10 +171,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
171
171
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
172
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
173
173
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
174
- modal_version/_version_generated.py,sha256=hpq9G9bj1lIN9FVnX1pPe-0C2iksk3gJ0Nb9YGUnxUc,149
175
- modal-0.73.12.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
176
- modal-0.73.12.dist-info/METADATA,sha256=WZ-Sz2y3pR6fU6vtUpEuaZK0XvXsSK-sQgpuFJz6h-4,2330
177
- modal-0.73.12.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
178
- modal-0.73.12.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
179
- modal-0.73.12.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
180
- modal-0.73.12.dist-info/RECORD,,
174
+ modal_version/_version_generated.py,sha256=MtaPLBwkPVoZNffoVcCV5xkGe5f45ot1wO9vJiFYB54,149
175
+ modal-0.73.14.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
176
+ modal-0.73.14.dist-info/METADATA,sha256=xnVIalqgqd_hi9eD7aivvJYk8BXJ-_mc31BXHrGkpPE,2330
177
+ modal-0.73.14.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
178
+ modal-0.73.14.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
179
+ modal-0.73.14.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
180
+ modal-0.73.14.dist-info/RECORD,,
modal_proto/api.proto CHANGED
@@ -1680,7 +1680,6 @@ message FunctionUpdateSchedulingParamsResponse {}
1680
1680
  message GPUConfig {
1681
1681
  GPUType type = 1; // Deprecated, at some point
1682
1682
  uint32 count = 2;
1683
- uint32 memory = 3;
1684
1683
  string gpu_type = 4;
1685
1684
  }
1686
1685