Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding MPI python sdk #1608

Merged
merged 28 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f6fb5e2
Adding latest image tag
johnugeorge Sep 15, 2021
140237f
Merge remote-tracking branch 'upstream/master'
johnugeorge Sep 22, 2021
1417bbc
Merge remote-tracking branch 'upstream/master'
johnugeorge Jan 17, 2022
38b9dc0
Merge remote-tracking branch 'upstream/master'
johnugeorge Jan 26, 2022
0f2651d
Update manifests with latest image tag
johnugeorge Jan 26, 2022
d266c81
Merge remote-tracking branch 'upstream/master'
johnugeorge Mar 1, 2022
f97d09f
Merge remote-tracking branch 'upstream/master'
johnugeorge May 26, 2022
012653f
Merge remote-tracking branch 'upstream/master'
johnugeorge Jun 1, 2022
ece1db9
Merge remote-tracking branch 'upstream/master'
johnugeorge Jun 2, 2022
9b7e66f
Update k8s dependencies to v0.24.1
johnugeorge Jun 4, 2022
671d32c
Update manifests
johnugeorge Jun 4, 2022
6e5fd45
Update k8s matrix for integration tests
johnugeorge Jun 5, 2022
fbe405e
Update k8s matrix for unit tests
johnugeorge Jun 5, 2022
7eed0b7
Fix k8s versions
johnugeorge Jun 5, 2022
fe398c1
Fix version
johnugeorge Jun 5, 2022
2ab2001
Add scripts in separate file
johnugeorge Jun 5, 2022
534d6d8
Fix Makefile
johnugeorge Jun 5, 2022
6bb0101
Cleanup Makefile
johnugeorge Jun 5, 2022
7cd30a5
Addressing review comments
johnugeorge Jun 5, 2022
e4e0fec
Merge remote-tracking branch 'upstream/master' into dep
johnugeorge Jun 9, 2022
cc03682
Generating sdk for MPI
johnugeorge Jun 9, 2022
27abe6c
Make list metadata optional
johnugeorge Jun 9, 2022
13b9db8
Adding open gen file
johnugeorge Jun 9, 2022
88a529a
Commit swagger change
johnugeorge Jun 9, 2022
190d49f
Adding XGboost python sdk
johnugeorge Jun 9, 2022
e9031f5
Merge remote-tracking branch 'upstream/master' into dep
johnugeorge Jun 9, 2022
8943b46
Adding MPI python sdk
johnugeorge Jun 10, 2022
fc08d10
Adding MPI python sdk
johnugeorge Jun 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hack/python-sdk/post_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def add_imports() -> None:
init_file.write("from kubeflow.training.api.tf_job_client import TFJobClient\n")
init_file.write("from kubeflow.training.api.py_torch_job_client import PyTorchJobClient\n")
init_file.write("from kubeflow.training.api.xgboost_job_client import XGBoostJobClient\n")
init_file.write("from kubeflow.training.api.mpi_job_client import MPIJobClient\n")
with open(os.path.join(sdk_dir, "kubeflow/__init__.py"), "a") as init_file:
init_file.write("__path__ = __import__('pkgutil').extend_path(__path__, __name__)")

Expand Down
6 changes: 5 additions & 1 deletion pkg/controller.v1/mpi/mpijob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (jc *MPIJobReconciler) GetDefaultContainerPortName() string {

func (jc *MPIJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec,
rtype commonv1.ReplicaType, index int) bool {
return false
return string(rtype) == string(mpiv1.MPIReplicaTypeLauncher)
}

func (jc *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error) {
Expand Down Expand Up @@ -1039,6 +1039,10 @@ func (jc *MPIJobReconciler) newLauncher(mpiJob *mpiv1.MPIJob, kubectlDeliveryIma
genericLabels := jc.GenLabels(mpiJob.GetName())
labels := defaultLauncherLabels(genericLabels)

masterRole := jc.IsMasterRole(mpiJob.Spec.MPIReplicaSpecs, mpiv1.MPIReplicaTypeLauncher, 0)
if masterRole {
labels[commonv1.JobRoleLabel] = "master"
}
podSpec := mpiJob.Spec.MPIReplicaSpecs[mpiv1.MPIReplicaTypeLauncher].Template.DeepCopy()
// copy the labels and annotations to pod from PodTemplate
if len(podSpec.Labels) == 0 {
Expand Down
1 change: 1 addition & 0 deletions sdk/python/kubeflow/training/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@
from kubeflow.training.api.tf_job_client import TFJobClient
from kubeflow.training.api.py_torch_job_client import PyTorchJobClient
from kubeflow.training.api.xgboost_job_client import XGBoostJobClient
from kubeflow.training.api.mpi_job_client import MPIJobClient
Loading