modal 0.73.23__py3-none-any.whl → 0.73.25__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/gpu.py +16 -30
- modal/image.py +1 -1
- {modal-0.73.23.dist-info → modal-0.73.25.dist-info}/METADATA +1 -1
- {modal-0.73.23.dist-info → modal-0.73.25.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.73.23.dist-info → modal-0.73.25.dist-info}/LICENSE +0 -0
- {modal-0.73.23.dist-info → modal-0.73.25.dist-info}/WHEEL +0 -0
- {modal-0.73.23.dist-info → modal-0.73.25.dist-info}/entry_points.txt +0 -0
- {modal-0.73.23.dist-info → modal-0.73.25.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.73.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.25"
|
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.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.25"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/gpu.py
CHANGED
@@ -154,31 +154,27 @@ class Any(_GPUConfig):
|
|
154
154
|
return f"GPU(Any, count={self.count})"
|
155
155
|
|
156
156
|
|
157
|
-
|
158
|
-
# TODO(erikbern): we will move this table to the server soon,
|
159
|
-
# and let clients just pass any gpu type string through
|
160
|
-
"t4": "T4",
|
161
|
-
"l4": "L4",
|
162
|
-
"a100": "A100-40GB",
|
163
|
-
"a100-80gb": "A100-80GB",
|
164
|
-
"h100": "H100",
|
165
|
-
"a10g": "A10G",
|
166
|
-
"l40s": "L40S",
|
167
|
-
"any": "ANY",
|
168
|
-
}
|
169
|
-
display_string_to_config = "\n".join(f'- "{key}"' for key in STRING_TO_GPU_TYPE.keys())
|
170
|
-
__doc__ = f"""
|
157
|
+
__doc__ = """
|
171
158
|
**GPU configuration shortcodes**
|
172
159
|
|
173
|
-
|
160
|
+
You can pass a wide range of `str` values for the `gpu` parameter of
|
174
161
|
[`@app.function`](/docs/reference/modal.App#function).
|
175
162
|
|
176
|
-
|
163
|
+
For instance:
|
164
|
+
- `gpu="H100"` will attach 1 H100 GPU to each container
|
165
|
+
- `gpu="L40S"` will attach 1 L40S GPU to each container
|
166
|
+
- `gpu="T4:4"` will attach 4 T4 GPUs to each container
|
177
167
|
|
178
|
-
|
179
|
-
|
168
|
+
You can see a list of Modal GPU options in the
|
169
|
+
[GPU docs](https://modal.com/docs/guide/gpu).
|
180
170
|
|
181
|
-
|
171
|
+
**Example**
|
172
|
+
|
173
|
+
```python
|
174
|
+
@app.function(gpu="A100-80GB:4")
|
175
|
+
def my_gpu_function():
|
176
|
+
... # This will have 4 A100-80GB with each container
|
177
|
+
```
|
182
178
|
"""
|
183
179
|
|
184
180
|
# bool will be deprecated in future versions.
|
@@ -196,17 +192,7 @@ def parse_gpu_config(value: GPU_T) -> api_pb2.GPUConfig:
|
|
196
192
|
count = int(count_str)
|
197
193
|
except ValueError:
|
198
194
|
raise InvalidError(f"Invalid GPU count: {count_str}. Value must be an integer.")
|
199
|
-
|
200
|
-
if value.lower() == "a100-40gb":
|
201
|
-
gpu_type = "A100-40GB"
|
202
|
-
elif value.lower() not in STRING_TO_GPU_TYPE:
|
203
|
-
raise InvalidError(
|
204
|
-
f"Invalid GPU type: {value}. "
|
205
|
-
f"Value must be one of {list(STRING_TO_GPU_TYPE.keys())} (case-insensitive)."
|
206
|
-
)
|
207
|
-
else:
|
208
|
-
gpu_type = STRING_TO_GPU_TYPE[value.lower()]
|
209
|
-
|
195
|
+
gpu_type = value.upper()
|
210
196
|
return api_pb2.GPUConfig(
|
211
197
|
gpu_type=gpu_type,
|
212
198
|
count=count,
|
modal/image.py
CHANGED
@@ -601,7 +601,7 @@ class _Image(_Object, type_prefix="im"):
|
|
601
601
|
dockerfile_commands=dockerfile.commands,
|
602
602
|
context_files=context_file_pb2s,
|
603
603
|
secret_ids=[secret.object_id for secret in secrets],
|
604
|
-
gpu=
|
604
|
+
gpu=gpu_config.count > 0, # Note: as of 2023-01-27, server still uses this
|
605
605
|
context_mount_id=(context_mount.object_id if context_mount else ""),
|
606
606
|
gpu_config=gpu_config, # Note: as of 2023-01-27, server ignores this
|
607
607
|
image_registry_config=image_registry_config.get_proto(),
|
@@ -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=
|
24
|
+
modal/client.pyi,sha256=dMogRnUnuDCHlwgwTRXIFzlY-nhL6_gPInyN-XDcYoo,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=agxclIXZbzBbgcI5PPVD7IfOiHzv-B82xaaXtw9cpv8,31126
|
@@ -41,8 +41,8 @@ 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
43
|
modal/functions.pyi,sha256=avRIY0KOFky6tDRI5_SvnLXz7PUnG2H0hQA385cRtb0,14289
|
44
|
-
modal/gpu.py,sha256=
|
45
|
-
modal/image.py,sha256=
|
44
|
+
modal/gpu.py,sha256=uDluoK3hXyj2YRxGhVDFOifOBCsXFTo5hVueGoJPb8w,6001
|
45
|
+
modal/image.py,sha256=KYc6bg-m9A6wiLF38dWcFBMrEATyR2KOF0sp-6O9uC0,91508
|
46
46
|
modal/image.pyi,sha256=kdJzy1eaxNPZeCpE0TMYYLhJ6UWmkfRDeb_vzngJUoQ,26462
|
47
47
|
modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
|
48
48
|
modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
|
@@ -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=
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
178
|
-
modal-0.73.
|
179
|
-
modal-0.73.
|
180
|
-
modal-0.73.
|
174
|
+
modal_version/_version_generated.py,sha256=zOq6AT1-UlblI4Elu8MBUEnlgnjkHOuf6oOVKN4SW38,149
|
175
|
+
modal-0.73.25.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
176
|
+
modal-0.73.25.dist-info/METADATA,sha256=ELZawxMX7dIgu5X25R7iqtkCN8m49WYpdh878J7Pykg,2330
|
177
|
+
modal-0.73.25.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
178
|
+
modal-0.73.25.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
179
|
+
modal-0.73.25.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
180
|
+
modal-0.73.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|