-
Notifications
You must be signed in to change notification settings - Fork 425
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
[kubectl-plugin] Add rayjob yaml generation to ray job submit command #2644
Conversation
} else if !info.Mode().IsRegular() { | ||
return fmt.Errorf("Filename given is not a regular file. Failed with: %w", err) | ||
} | ||
// Take care of case where no file name |
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.
Not sure if this comment is incorrect, as the next line checks that the filename is not empty.
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.
Oh yes, it should be take care of case where there is a filename
@@ -71,6 +82,8 @@ var ( | |||
Submit ray job to ray cluster as one would using ray CLI e.g. 'ray job submit ENTRYPOINT'. Command supports all options that 'ray job submit' supports, except '--address'. | |||
If RayCluster is already setup, use 'kubectl ray session' instead. | |||
|
|||
If no ray job file is specified, one will be generated. |
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.
We don't generate yaml file; we only apply a default RayCluster object for users, right?
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.
We will generate a basic/ rayjob apply config and apply that.
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.
Okay, I changed the wording. Please take another look.
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.
Oh, I see. Here, "one" refers to "RayJob", not "ray job file", right? Wouldn't it be better to replace this word with something more explicit? At first, I thought "one" referred to "ray job file".
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.
Yea, one is suppose to refer to RayJob, but you're right, having something explicit is definitely better in case of confusion.
There should be anymore confusion from the wording.
af91523
to
147b306
Compare
ee04aaa
to
99a45e8
Compare
fe7d2cd
to
e99e7d7
Compare
WorkerMemory: options.workerMemory, | ||
WorkerReplicas: options.workerReplicas, | ||
// This is here to match the existing rayjob sample. | ||
WorkerLifecyclePrestopExecComand: []string{"/bin/sh", "-c", "ray stop"}, |
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.
I don't think we need this, or at least we've been removing them in sample YAML
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.
Confirmed that the sample rayjob still work after this is removed.
e99e7d7
to
bcc1edc
Compare
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.
LGTM, left a small nit
bcc1edc
to
7a5474d
Compare
log.Fatalf("Failed to mark flag as required %v", err) | ||
} | ||
|
||
cmd.Flags().StringVar(&options.rayjobName, "name", "", "Name of the ray job that will be generated") |
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.
Any way we can consolidate these flags into a single place with the flags also used in kubectl ray create cluster
?
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.
I don't know if it's possible, I think we can try sharing the flags in some way. For example, setting the "parent" command to have these flags and this way all the "child" commands will as well.
Why are these changes needed?
Allows user to not need a pre-written rayjob yaml to submit a rayjob.
Related issue number
Part of #2608
Checks