Skip to content

Modal

Modal integration for cloud-native step execution.

The Modal integration sub-module provides a step operator flavor that allows executing steps on Modal's cloud infrastructure.

ModalIntegration

Bases: Integration

Definition of Modal integration for ZenML.

Source code in src/zenml/integrations/modal/__init__.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class ModalIntegration(Integration):
    """Definition of Modal integration for ZenML."""

    NAME = MODAL
    REQUIREMENTS = ["modal>=0.64.49,<1"]

    @classmethod
    def flavors(cls) -> List[Type[Flavor]]:
        """Declare the stack component flavors for the Modal integration.

        Returns:
            List of new stack component flavors.
        """
        from zenml.integrations.modal.flavors import ModalStepOperatorFlavor

        return [ModalStepOperatorFlavor]

flavors() classmethod

Declare the stack component flavors for the Modal integration.

Returns:

Type Description
List[Type[Flavor]]

List of new stack component flavors.

Source code in src/zenml/integrations/modal/__init__.py
34
35
36
37
38
39
40
41
42
43
@classmethod
def flavors(cls) -> List[Type[Flavor]]:
    """Declare the stack component flavors for the Modal integration.

    Returns:
        List of new stack component flavors.
    """
    from zenml.integrations.modal.flavors import ModalStepOperatorFlavor

    return [ModalStepOperatorFlavor]