diff --git a/docs/cluster/cluster.html b/docs/cluster/cluster.html index 8a313dc75..82c7c154e 100644 --- a/docs/cluster/cluster.html +++ b/docs/cluster/cluster.html @@ -160,6 +160,16 @@

Module codeflare_sdk.cluster.cluster

print(f"Priority class {priority_class} is not available in the cluster") return None + def validate_image_config(self): + """ + Validates that the image configuration is not empty. + + :param image: The image string to validate + :raises ValueError: If the image is not specified + """ + if self.config.image == "" or self.config.image == None: + raise ValueError("Image must be specified in the ClusterConfiguration") + def create_app_wrapper(self): """ Called upon cluster object creation, creates an AppWrapper yaml based on @@ -175,6 +185,9 @@

Module codeflare_sdk.cluster.cluster

f"Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication." ) + # Validate image configuration + self.validate_image_config() + # Before attempting to create the cluster AW, let's evaluate the ClusterConfig if self.config.dispatch_priority: if not self.config.mcad: @@ -1095,6 +1108,16 @@

Classes

print(f"Priority class {priority_class} is not available in the cluster") return None + def validate_image_config(self): + """ + Validates that the image configuration is not empty. + + :param image: The image string to validate + :raises ValueError: If the image is not specified + """ + if self.config.image == "" or self.config.image == None: + raise ValueError("Image must be specified in the ClusterConfiguration") + def create_app_wrapper(self): """ Called upon cluster object creation, creates an AppWrapper yaml based on @@ -1110,6 +1133,9 @@

Classes

f"Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication." ) + # Validate image configuration + self.validate_image_config() + # Before attempting to create the cluster AW, let's evaluate the ClusterConfig if self.config.dispatch_priority: if not self.config.mcad: @@ -1650,6 +1676,9 @@

Methods

f"Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication." ) + # Validate image configuration + self.validate_image_config() + # Before attempting to create the cluster AW, let's evaluate the ClusterConfig if self.config.dispatch_priority: if not self.config.mcad: @@ -2088,6 +2117,28 @@

Methods

return _kube_api_error_handling(e) +
+def validate_image_config(self) +
+
+

Validates that the image configuration is not empty.

+

:param image: The image string to validate +:raises ValueError: If the image is not specified

+
+ +Expand source code + +
def validate_image_config(self):
+    """
+    Validates that the image configuration is not empty.
+
+    :param image: The image string to validate
+    :raises ValueError: If the image is not specified
+    """
+    if self.config.image == "" or self.config.image == None:
+        raise ValueError("Image must be specified in the ClusterConfiguration")
+
+
def wait_ready(self, timeout: Optional[int] = None, dashboard_check: bool = True)
@@ -2182,6 +2233,7 @@

torchx_config
  • torchx_scheduler
  • up
  • +
  • validate_image_config
  • wait_ready
  • diff --git a/docs/cluster/config.html b/docs/cluster/config.html index f9b762baf..a4f2d6624 100644 --- a/docs/cluster/config.html +++ b/docs/cluster/config.html @@ -80,7 +80,7 @@

    Module codeflare_sdk.cluster.config

    instascale: bool = False mcad: bool = True envs: dict = field(default_factory=dict) - image: str = "quay.io/project-codeflare/ray:latest-py39-cu118" + image: str = "" local_interactive: bool = False image_pull_secrets: list = field(default_factory=list) dispatch_priority: str = None @@ -100,7 +100,7 @@

    Classes

    class ClusterConfiguration -(name: str, namespace: str = None, head_info: list = <factory>, head_cpus: int = 2, head_memory: int = 8, head_gpus: int = 0, machine_types: list = <factory>, min_cpus: int = 1, max_cpus: int = 1, num_workers: int = 1, min_memory: int = 2, max_memory: int = 2, num_gpus: int = 0, template: str = '/home/runner/work/codeflare-sdk/codeflare-sdk/src/codeflare_sdk/templates/base-template.yaml', instascale: bool = False, mcad: bool = True, envs: dict = <factory>, image: str = 'quay.io/project-codeflare/ray:latest-py39-cu118', local_interactive: bool = False, image_pull_secrets: list = <factory>, dispatch_priority: str = None, openshift_oauth: bool = False, ingress_options: dict = <factory>, ingress_domain: str = None) +(name: str, namespace: str = None, head_info: list = <factory>, head_cpus: int = 2, head_memory: int = 8, head_gpus: int = 0, machine_types: list = <factory>, min_cpus: int = 1, max_cpus: int = 1, num_workers: int = 1, min_memory: int = 2, max_memory: int = 2, num_gpus: int = 0, template: str = '/home/runner/work/codeflare-sdk/codeflare-sdk/src/codeflare_sdk/templates/base-template.yaml', instascale: bool = False, mcad: bool = True, envs: dict = <factory>, image: str = '', local_interactive: bool = False, image_pull_secrets: list = <factory>, dispatch_priority: str = None, openshift_oauth: bool = False, ingress_options: dict = <factory>, ingress_domain: str = None)

    This dataclass is used to specify resource requirements and other details, and @@ -132,7 +132,7 @@

    Classes

    instascale: bool = False mcad: bool = True envs: dict = field(default_factory=dict) - image: str = "quay.io/project-codeflare/ray:latest-py39-cu118" + image: str = "" local_interactive: bool = False image_pull_secrets: list = field(default_factory=list) dispatch_priority: str = None