From eb9cc9ec736f0f27d9b70c017c586859e414bb0f Mon Sep 17 00:00:00 2001 From: Terry Kong Date: Wed, 17 Jul 2024 16:16:53 -0700 Subject: [PATCH] Updates constants referenced for kubeflow objects and set lower bound on (#385) library to 1.8 Signed-off-by: Terry Kong --- launcher_scripts/nemo_launcher/core/v2/step_k8s.py | 6 +++--- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher_scripts/nemo_launcher/core/v2/step_k8s.py b/launcher_scripts/nemo_launcher/core/v2/step_k8s.py index 86f0377f38..24797438fa 100644 --- a/launcher_scripts/nemo_launcher/core/v2/step_k8s.py +++ b/launcher_scripts/nemo_launcher/core/v2/step_k8s.py @@ -166,7 +166,7 @@ def create_pytorchjob_resource( ), ) pytorch_job = KubeflowOrgV1PyTorchJob( - api_version=f"{constants.KUBEFLOW_GROUP}/{constants.OPERATOR_VERSION}", + api_version=f"{constants.API_VERSION}", kind=constants.PYTORCHJOB_KIND, metadata=V1ObjectMeta(generate_name=generate_name, namespace=namespace), spec=KubeflowOrgV1PyTorchJobSpec( @@ -290,7 +290,7 @@ def replica_template(n_replicas: int, container: V1Container): launcher = replica_template(n_replicas=1, container=launch_container,) worker = replica_template(n_replicas=n_workers, container=worker_container,) mpijob = KubeflowOrgV1MPIJob( - api_version=f"{constants.KUBEFLOW_GROUP}/{constants.OPERATOR_VERSION}", + api_version=f"{constants.API_VERSION}", kind=constants.MPIJOB_KIND, metadata=V1ObjectMeta(generate_name=generate_name, namespace=namespace), spec=KubeflowOrgV1MPIJobSpec( @@ -334,7 +334,7 @@ def replica_template(n_replicas: int, container: V1Container): def delete_pytorchjob(name: str = "delete-pytorchjob"): manifest = dedent( f""" - apiVersion: {constants.KUBEFLOW_GROUP}/{constants.OPERATOR_VERSION} + apiVersion: {constants.API_VERSION} kind: {constants.PYTORCHJOB_KIND} metadata: name: {{{{inputs.parameters.metadata_name}}}} diff --git a/requirements.txt b/requirements.txt index f4302775fa..6849d16df3 100755 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,5 @@ zstandard==0.15.2 sqlitedict hera pydantic -kubeflow-training +kubeflow-training>=1.8 kubernetes