From 1bed6ee7938f6cf9f027df5ab419ce1197d4e546 Mon Sep 17 00:00:00 2001 From: Romil Bhardwaj Date: Sun, 19 Nov 2023 12:40:22 +0530 Subject: [PATCH] fixes --- docs/source/reference/kubernetes/kubernetes-setup.rst | 2 +- sky/utils/kubernetes_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/reference/kubernetes/kubernetes-setup.rst b/docs/source/reference/kubernetes/kubernetes-setup.rst index cdf06ee0e81..355a06f7a8d 100644 --- a/docs/source/reference/kubernetes/kubernetes-setup.rst +++ b/docs/source/reference/kubernetes/kubernetes-setup.rst @@ -169,7 +169,7 @@ Setting up GPU support ~~~~~~~~~~~~~~~~~~~~~~ If your Kubernetes cluster has Nvidia GPUs, ensure that: -1. The Nvidia device plugin installed (i.e., ``nvidia.com/gpu`` resource is available on each node). +1. The Nvidia device plugin is installed (i.e., ``nvidia.com/gpu`` resource is available on each node). 2. Each node in your cluster is labelled with the GPU type. This labelling can be done by adding a label of the format ``skypilot.co/accelerators: ``, where the ```` is the lowercase name of the GPU. For example, a node with V100 GPUs must have a label :code:`skypilot.co/accelerators: v100`. We provide a convenience script that automatically detects GPU types and labels each node. You can run it with: diff --git a/sky/utils/kubernetes_utils.py b/sky/utils/kubernetes_utils.py index 0eb040d85b7..17638a35f2a 100644 --- a/sky/utils/kubernetes_utils.py +++ b/sky/utils/kubernetes_utils.py @@ -115,7 +115,7 @@ def get_accelerator_from_label_value(cls, value: str) -> str: def validate_label_value(cls, value: str) -> Tuple[bool, str]: """Values must be all lowercase for the SkyPilot formatter.""" is_valid = value == value.lower() - return is_valid, (f'Label value "{value}" must be lowercase if using ' + return is_valid, (f'Label value {value!r} must be lowercase if using ' f'the {cls.get_label_key()} label.' if not is_valid else '') @@ -375,7 +375,7 @@ def get_gpu_label_key_value(acc_type: str, check_mode=False) -> Tuple[str, str]: value) if not is_valid: raise exceptions.ResourcesUnavailableError( - f'Node {node_name} in Kubernetes cluster has ' + f'Node {node_name!r} in Kubernetes cluster has ' f'invalid GPU label: {label}={value}. {reason}') if check_mode: # If check mode is enabled and we reached so far, we can