From f7743fc7a0986ee9bc6bf7736280cdc68cd50c01 Mon Sep 17 00:00:00 2001 From: Antreas Antoniou Date: Fri, 16 Feb 2024 13:15:39 +0000 Subject: [PATCH] change kubernetes_queue_name to kueue_queue_name --- kubejobs/examples/example_disk_defined_job.py | 4 ++-- kubejobs/examples/example_docker_in_docker_job.py | 4 ++-- kubejobs/examples/example_interactive_job.py | 4 ++-- kubejobs/examples/example_job.py | 4 ++-- kubejobs/examples/example_storage_write_read.py | 6 +++--- kubejobs/jobs.py | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/kubejobs/examples/example_disk_defined_job.py b/kubejobs/examples/example_disk_defined_job.py index f2536c0..1a5096e 100644 --- a/kubejobs/examples/example_disk_defined_job.py +++ b/kubejobs/examples/example_disk_defined_job.py @@ -1,7 +1,7 @@ # Example usage: import time -from kubejobs.jobs import KubernetesJob, create_pvc, KubeQueue +from kubejobs.jobs import KubernetesJob, create_pvc, KueueQueue env_vars = { "DATASET_DIR": "/data/", @@ -17,7 +17,7 @@ job = KubernetesJob( name=f"gate-dev-{unique_id}", image="ghcr.io/antreasantoniou/gate:latest", - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, command=["/bin/bash", "-c", "--"], args=["while true; do sleep 60; done;"], gpu_type="nvidia.com/gpu", diff --git a/kubejobs/examples/example_docker_in_docker_job.py b/kubejobs/examples/example_docker_in_docker_job.py index 0695ff5..9240938 100644 --- a/kubejobs/examples/example_docker_in_docker_job.py +++ b/kubejobs/examples/example_docker_in_docker_job.py @@ -2,7 +2,7 @@ from rich import print -from kubejobs.jobs import KubernetesJob, create_pvc, KubeQueue +from kubejobs.jobs import KubernetesJob, create_pvc, KueueQueue # unique id generated using time unique_id = time.strftime("%Y%m%d%H%M%S") @@ -12,7 +12,7 @@ name=f"dind-{unique_id}", image="docker:dind", gpu_type="nvidia.com/gpu", - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, gpu_product="NVIDIA-A100-SXM4-40GB", gpu_limit=1, shm_size="100G", diff --git a/kubejobs/examples/example_interactive_job.py b/kubejobs/examples/example_interactive_job.py index 0fdcf44..daa657f 100644 --- a/kubejobs/examples/example_interactive_job.py +++ b/kubejobs/examples/example_interactive_job.py @@ -3,7 +3,7 @@ from rich import print -from kubejobs.jobs import KubernetesJob, create_pvc, KubeQueue +from kubejobs.jobs import KubernetesJob, create_pvc, KueueQueue env_vars = { "DATASET_DIR": "/data/", @@ -23,7 +23,7 @@ name=f"debug-kubejobs-{unique_id}", image="ghcr.io/antreasantoniou/gate:latest", command=["/bin/bash", "-c", "--"], - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, args=["while true; do sleep 60; done;"], gpu_type="nvidia.com/gpu", gpu_product="NVIDIA-A100-SXM4-40GB", diff --git a/kubejobs/examples/example_job.py b/kubejobs/examples/example_job.py index d814d4f..0609f5d 100644 --- a/kubejobs/examples/example_job.py +++ b/kubejobs/examples/example_job.py @@ -4,7 +4,7 @@ from kubejobs.jobs import ( KubernetesJob, create_jobs_for_experiments, - create_pvc, KubeQueue + create_pvc, KueueQueue ) # unique id generated using time @@ -20,7 +20,7 @@ image="nvcr.io/nvidia/cuda:12.0.0-cudnn8-devel-ubuntu22.04", command=["/bin/bash"], args=["-c", "df -h"], - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, gpu_type="nvidia.com/gpu", gpu_product="NVIDIA-A100-SXM4-80GB", gpu_limit=2, diff --git a/kubejobs/examples/example_storage_write_read.py b/kubejobs/examples/example_storage_write_read.py index 58d66de..2f99594 100644 --- a/kubejobs/examples/example_storage_write_read.py +++ b/kubejobs/examples/example_storage_write_read.py @@ -1,7 +1,7 @@ from rich import print from kubejobs.jobs import KubernetesJob as Job -from kubejobs.jobs import KubeQueue +from kubejobs.jobs import KueueQueue from kubejobs.jobs import create_pvc # Create PVC if not created @@ -13,7 +13,7 @@ image="ubuntu:20.04", command=["/bin/bash", "-c"], args=["echo 'Hello, World!' > /mnt/data/sample.txt"], - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, volume_mounts={ "dataset-disk": { "pvc": "datasets-pvc-0", @@ -30,7 +30,7 @@ image="ubuntu:20.04", command=["/bin/bash", "-c"], args=["cat /mnt/data/sample.txt"], - kubernetes_queue_name=KubeQueue.INFORMATICS, + kueue_queue_name=KueueQueue.INFORMATICS, volume_mounts={ "dataset-disk": { "pvc": "datasets-pvc-0", diff --git a/kubejobs/jobs.py b/kubejobs/jobs.py index 84ede5c..6c7a330 100644 --- a/kubejobs/jobs.py +++ b/kubejobs/jobs.py @@ -62,7 +62,7 @@ class GPU_PRODUCT: NVIDIA_A100_SXM4_40GB_MIG_1G_5GB = "NVIDIA-A100-SXM4-40GB-MIG-1g.5gb" NVIDIA_H100_80GB = "NVIDIA-H100-80GB-HBM3" -class KubeQueue: +class KueueQueue: INFORMATICS = "informatics-user-queue" @@ -101,7 +101,7 @@ def __init__( self, name: str, image: str, - kubernetes_queue_name: str, + kueue_queue_name: str, command: List[str] = None, args: Optional[List[str]] = None, cpu_request: Optional[str] = None,