From c5443d656c4ff41d155505aa66b2051a401e75c2 Mon Sep 17 00:00:00 2001 From: Minwoo Park <33341131+minwoo33park@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:59:09 -0400 Subject: [PATCH] Support checking H100 quota (#3367) Co-authored-by: minwoopark --- .../model_oss/notebook_util/common_util.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/community-content/vertex_model_garden/model_oss/notebook_util/common_util.py b/community-content/vertex_model_garden/model_oss/notebook_util/common_util.py index d9f040f86..ef4e6ceab 100644 --- a/community-content/vertex_model_garden/model_oss/notebook_util/common_util.py +++ b/community-content/vertex_model_garden/model_oss/notebook_util/common_util.py @@ -231,22 +231,6 @@ def download_image(url: str) -> str: return Image.open(io.BytesIO(response.content)) -def resize_image(image: Any, new_width: int = 1000) -> Any: - """Resizes an image to a certain width. - - Args: - image: The image which has to be resized. - new_width: New width of the image. - - Returns: - New resized image. - """ - width, height = image.size - new_height = int(height * new_width / width) - new_img = image.resize((new_width, new_height)) - return new_img - - def load_img(path: str) -> Any: """Reads image from path and return PIL.Image instance. @@ -389,6 +373,7 @@ def get_resource_id(accelerator_type: str, is_for_training: bool) -> str: "NVIDIA_L4": "custom_model_training_nvidia_l4_gpus", "NVIDIA_TESLA_A100": "custom_model_training_nvidia_a100_gpus", "NVIDIA_A100_80GB": "custom_model_training_nvidia_a100_80gb_gpus", + "NVIDIA_H100_80GB": "custom_model_training_nvidia_h100_gpus", "NVIDIA_TESLA_T4": "custom_model_training_nvidia_t4_gpus", "TPU_V5e": "custom_model_training_tpu_v5e", "TPU_V3": "custom_model_training_tpu_v3", @@ -398,6 +383,7 @@ def get_resource_id(accelerator_type: str, is_for_training: bool) -> str: "NVIDIA_L4": "custom_model_serving_nvidia_l4_gpus", "NVIDIA_TESLA_A100": "custom_model_serving_nvidia_a100_gpus", "NVIDIA_A100_80GB": "custom_model_serving_nvidia_a100_80gb_gpus", + "NVIDIA_H100_80GB": "custom_model_serving_nvidia_h100_gpus", "NVIDIA_TESLA_T4": "custom_model_serving_nvidia_t4_gpus", "TPU_V5e": "custom_model_serving_tpu_v5e", }