Skip to content

Commit

Permalink
Disable client-side caching for some orchestrators
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Dec 2, 2024
1 parent 2b843f4 commit a30a677
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ def is_schedulable(self) -> bool:
"""
return True

@property
def supports_client_side_caching(self) -> bool:
"""Whether the orchestrator supports client side caching.
Returns:
Whether the orchestrator supports client side caching.
"""
# The Kubernetes orchestrator starts step pods from a pipeline pod.
# This is currently not supported when using client-side caching.
return False


class KubernetesOrchestratorFlavor(BaseOrchestratorFlavor):
"""Kubernetes orchestrator flavor."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ def is_schedulable(self) -> bool:
"""
return False

@property
def supports_client_side_caching(self) -> bool:
"""Whether the orchestrator supports client side caching.
Returns:
Whether the orchestrator supports client side caching.
"""
# The Lightning orchestrator starts step studios from a pipeline studio.
# This is currently not supported when using client-side caching.
return False


class LightningOrchestratorFlavor(BaseOrchestratorFlavor):
"""Lightning orchestrator flavor."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,15 @@ def is_local(self) -> bool:
True if this config is for a local component, False otherwise.
"""
return False

@property
def supports_client_side_caching(self) -> bool:
"""Whether the orchestrator supports client side caching.
Returns:
Whether the orchestrator supports client side caching.
"""
# The Skypilot orchestrator runs the entire pipeline in a single VM, or
# starts additional VMs from the root VM. Both of those cases are
# currently not supported when using client-side caching.
return False
10 changes: 10 additions & 0 deletions src/zenml/orchestrators/base_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def is_schedulable(self) -> bool:
"""
return False

@property
def supports_client_side_caching(self) -> bool:
"""Whether the orchestrator supports client side caching.
Returns:
Whether the orchestrator supports client side caching.
"""
return True


class BaseOrchestrator(StackComponent, ABC):
"""Base class for all orchestrators.
Expand Down Expand Up @@ -205,6 +214,7 @@ def run(

if (
placeholder_run
and self.config.supports_client_side_caching
and not deployment.schedule
and not prevent_client_side_caching
):
Expand Down
12 changes: 3 additions & 9 deletions src/zenml/service_connectors/service_connector_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,9 @@ def _raise_specific_cloud_exception_if_needed(
orchestrators: List[ResourcesInfo],
container_registries: List[ResourcesInfo],
) -> None:
AWS_DOCS = (
"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/aws-service-connector"
)
GCP_DOCS = (
"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/gcp-service-connector"
)
AZURE_DOCS = (
"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/azure-service-connector"
)
AWS_DOCS = "https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/aws-service-connector"
GCP_DOCS = "https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/gcp-service-connector"
AZURE_DOCS = "https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/azure-service-connector"

if not artifact_stores:
error_msg = (
Expand Down

0 comments on commit a30a677

Please sign in to comment.