modal 0.73.145__py3-none-any.whl → 0.73.147__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/_functions.py +8 -6
- modal/_partial_function.py +384 -264
- modal/_runtime/user_code_imports.py +2 -2
- modal/app.py +20 -20
- modal/client.pyi +2 -2
- modal/cls.py +11 -7
- modal/container_process.py +4 -1
- modal/container_process.pyi +2 -0
- modal/experimental/__init__.py +6 -35
- modal/partial_function.py +1 -1
- modal/partial_function.pyi +82 -39
- modal/sandbox.py +1 -1
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/METADATA +1 -1
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/RECORD +19 -19
- modal_version/_version_generated.py +1 -1
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/LICENSE +0 -0
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/WHEEL +0 -0
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/entry_points.txt +0 -0
- {modal-0.73.145.dist-info → modal-0.73.147.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -564,7 +564,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
564
564
|
network_file_systems=network_file_systems,
|
565
565
|
volumes=volumes,
|
566
566
|
memory=memory,
|
567
|
-
timeout=pf.build_timeout,
|
567
|
+
timeout=pf.params.build_timeout,
|
568
568
|
cpu=cpu,
|
569
569
|
ephemeral_disk=ephemeral_disk,
|
570
570
|
is_builder_function=True,
|
@@ -575,7 +575,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
575
575
|
image = _Image._from_args(
|
576
576
|
base_images={"base": image},
|
577
577
|
build_function=snapshot_function,
|
578
|
-
force_build=image.force_build or pf.force_build,
|
578
|
+
force_build=image.force_build or bool(pf.params.force_build),
|
579
579
|
)
|
580
580
|
|
581
581
|
# Note that we also do these checks in FunctionCreate; could drop them here
|
@@ -644,12 +644,14 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
644
644
|
|
645
645
|
if info.user_cls:
|
646
646
|
method_definitions = {}
|
647
|
-
|
648
|
-
|
649
|
-
|
647
|
+
interface_methods = _find_partial_methods_for_user_cls(
|
648
|
+
info.user_cls, _PartialFunctionFlags.interface_flags()
|
649
|
+
)
|
650
|
+
for method_name, partial_function in interface_methods.items():
|
651
|
+
function_type = get_function_type(partial_function.params.is_generator)
|
650
652
|
function_name = f"{info.user_cls.__name__}.{method_name}"
|
651
653
|
method_definition = api_pb2.MethodDefinition(
|
652
|
-
webhook_config=partial_function.webhook_config,
|
654
|
+
webhook_config=partial_function.params.webhook_config,
|
653
655
|
function_type=function_type,
|
654
656
|
function_name=function_name,
|
655
657
|
)
|