-
Notifications
You must be signed in to change notification settings - Fork 712
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
Feature/support pytorchjob set queue of volcano #1415
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ import ( | |
"sigs.k8s.io/controller-runtime/pkg/client" | ||
"sigs.k8s.io/controller-runtime/pkg/log" | ||
"sigs.k8s.io/controller-runtime/pkg/manager" | ||
podgroupv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" | ||
volcanoclient "volcano.sh/apis/pkg/client/clientset/versioned" | ||
) | ||
|
||
|
@@ -155,13 +156,18 @@ func (r *PyTorchJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) | |
// Set default priorities to pytorch job | ||
r.Scheme.Default(pytorchjob) | ||
|
||
// parse volcano Queue from pytorchjob Annotation | ||
schedulingPolicy := &commonv1.SchedulingPolicy{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since Pytorch spec embed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now it is always nil for SchedulingPolicy in pytorch-operator, if SchedulingPolicy is seted , it is ok use // github.com/kubeflow/tf-operator/pkg/controller.v1/pytorch/pytorchjob_controller.go
runPolicy := &commonv1.RunPolicy{
CleanPodPolicy: pytorchjob.Spec.RunPolicy.CleanPodPolicy,
TTLSecondsAfterFinished: pytorchjob.Spec.RunPolicy.TTLSecondsAfterFinished,
ActiveDeadlineSeconds: pytorchjob.Spec.RunPolicy.ActiveDeadlineSeconds,
BackoffLimit: pytorchjob.Spec.RunPolicy.BackoffLimit,
SchedulingPolicy: nil,
}
// Use common to reconcile the job related pod and service
err = r.ReconcileJobs(pytorchjob, pytorchjob.Spec.PyTorchReplicaSpecs, pytorchjob.Status, runPolicy) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Jeffwan I update the pr
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Should we make it in another PR? |
||
Queue: pytorchjob.Annotations[podgroupv1beta1.QueueNameAnnotationKey], | ||
} | ||
|
||
// Construct RunPolicy based on PyTorchJob.Spec | ||
runPolicy := &commonv1.RunPolicy{ | ||
CleanPodPolicy: pytorchjob.Spec.RunPolicy.CleanPodPolicy, | ||
TTLSecondsAfterFinished: pytorchjob.Spec.RunPolicy.TTLSecondsAfterFinished, | ||
ActiveDeadlineSeconds: pytorchjob.Spec.RunPolicy.ActiveDeadlineSeconds, | ||
BackoffLimit: pytorchjob.Spec.RunPolicy.BackoffLimit, | ||
SchedulingPolicy: nil, | ||
SchedulingPolicy: schedulingPolicy, | ||
} | ||
|
||
// Use common to reconcile the job related pod and service | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about other jobs?