Skip to content

Commit

Permalink
change kubernetes_queue_name to kueue_queue_name
Browse files Browse the repository at this point in the history
  • Loading branch information
AntreasAntoniou authored Feb 16, 2024
1 parent 4129449 commit f7743fc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions kubejobs/examples/example_disk_defined_job.py
Original file line number Diff line number Diff line change
@@ -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/",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions kubejobs/examples/example_docker_in_docker_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions kubejobs/examples/example_interactive_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions kubejobs/examples/example_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from kubejobs.jobs import (
KubernetesJob,
create_jobs_for_experiments,
create_pvc, KubeQueue
create_pvc, KueueQueue
)

# unique id generated using time
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions kubejobs/examples/example_storage_write_read.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions kubejobs/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f7743fc

Please sign in to comment.