Skip to content

Commit

Permalink
Fix container name in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyvelich committed Jan 11, 2023
1 parent 55f6922 commit 32e32f2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
5 changes: 3 additions & 2 deletions sdk/python/test/e2e/test_e2e_mpijob.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
TRAINING_CLIENT = TrainingClient(config_file=os.getenv("KUBECONFIG", "~/.kube/config"))
SDK_TEST_NAMESPACE = "default"
JOB_NAME = "mpijob-mxnet-ci-test"
CONTAINER_NAME = "mpi"


def test_sdk_e2e():
master_container = V1Container(
name="mpi",
name=CONTAINER_NAME,
image="horovod/horovod:0.20.0-tf2.3.0-torch1.6.0-mxnet1.5.0-py3.7-cpu",
command=["mpirun"],
args=[
Expand Down Expand Up @@ -96,6 +97,6 @@ def test_sdk_e2e():
JOB_NAME, SDK_TEST_NAMESPACE, constants.MPIJOB_KIND
)

TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE)
TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE, container=CONTAINER_NAME)

TRAINING_CLIENT.delete_mpijob(JOB_NAME, SDK_TEST_NAMESPACE)
9 changes: 5 additions & 4 deletions sdk/python/test/e2e/test_e2e_mxjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
TRAINING_CLIENT = TrainingClient(config_file=os.getenv("KUBECONFIG", "~/.kube/config"))
SDK_TEST_NAMESPACE = "default"
JOB_NAME = "mxjob-mnist-ci-test"
CONTAINER_NAME = "mpi"


def test_sdk_e2e():
worker_container = V1Container(
name="mxnet",
name=CONTAINER_NAME,
image="docker.io/johnugeorge/mxnet:1.9.1_cpu_py3",
command=["/usr/local/bin/python3"],
args=[
Expand All @@ -50,13 +51,13 @@ def test_sdk_e2e():
)

server_container = V1Container(
name="mxnet",
name=CONTAINER_NAME,
image="docker.io/johnugeorge/mxnet:1.9.1_cpu_py3",
ports=[V1ContainerPort(container_port=9991, name="mxjob-port")],
)

scheduler_container = V1Container(
name="mxnet",
name=CONTAINER_NAME,
image="docker.io/johnugeorge/mxnet:1.9.1_cpu_py3",
ports=[V1ContainerPort(container_port=9991, name="mxjob-port")],
)
Expand Down Expand Up @@ -100,6 +101,6 @@ def test_sdk_e2e():
JOB_NAME, SDK_TEST_NAMESPACE, constants.MXJOB_KIND
)

TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE)
TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE, container=CONTAINER_NAME)

TRAINING_CLIENT.delete_mxjob(JOB_NAME, SDK_TEST_NAMESPACE)
5 changes: 3 additions & 2 deletions sdk/python/test/e2e/test_e2e_paddlejob.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
TRAINING_CLIENT = TrainingClient(config_file=os.getenv("KUBECONFIG", "~/.kube/config"))
SDK_TEST_NAMESPACE = "default"
JOB_NAME = "paddlejob-cpu-ci-test"
CONTAINER_NAME = "paddle"


def test_sdk_e2e():
container = V1Container(
name="paddle",
name=CONTAINER_NAME,
image="docker.io/paddlepaddle/paddle:2.4.0rc0-cpu",
command=["python"],
args=["-m", "paddle.distributed.launch", "run_check"],
Expand Down Expand Up @@ -61,6 +62,6 @@ def test_sdk_e2e():
JOB_NAME, SDK_TEST_NAMESPACE, constants.PADDLEJOB_KIND
)

TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE)
TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE, container=CONTAINER_NAME)

TRAINING_CLIENT.delete_paddlejob(JOB_NAME, SDK_TEST_NAMESPACE)
5 changes: 3 additions & 2 deletions sdk/python/test/e2e/test_e2e_pytorchjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
TRAINING_CLIENT = TrainingClient(config_file=os.getenv("KUBECONFIG", "~/.kube/config"))
SDK_TEST_NAMESPACE = "default"
JOB_NAME = "pytorchjob-mnist-ci-test"
CONTAINER_NAME = "pytorch"


def test_sdk_e2e():
container = V1Container(
name="pytorch",
name=CONTAINER_NAME,
image="gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0",
args=["--backend", "gloo"],
)
Expand Down Expand Up @@ -66,6 +67,6 @@ def test_sdk_e2e():
JOB_NAME, SDK_TEST_NAMESPACE, constants.PYTORCHJOB_KIND
)

TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE)
TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE, container=CONTAINER_NAME)

TRAINING_CLIENT.delete_pytorchjob(JOB_NAME, SDK_TEST_NAMESPACE)
5 changes: 3 additions & 2 deletions sdk/python/test/e2e/test_e2e_xgboostjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
TRAINING_CLIENT = TrainingClient(config_file=os.getenv("KUBECONFIG", "~/.kube/config"))
SDK_TEST_NAMESPACE = "default"
JOB_NAME = "xgboostjob-iris-ci-test"
CONTAINER_NAME = "xgboost"


def test_sdk_e2e():
container = V1Container(
name="xgboost",
name=CONTAINER_NAME,
image="docker.io/merlintang/xgboost-dist-iris:1.1",
args=[
"--job_type=Train",
Expand Down Expand Up @@ -73,6 +74,6 @@ def test_sdk_e2e():
JOB_NAME, SDK_TEST_NAMESPACE, constants.XGBOOSTJOB_KIND
)

TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE)
TRAINING_CLIENT.get_job_logs(JOB_NAME, SDK_TEST_NAMESPACE, container=CONTAINER_NAME)

TRAINING_CLIENT.delete_xgboostjob(JOB_NAME, SDK_TEST_NAMESPACE)

0 comments on commit 32e32f2

Please sign in to comment.