-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(glue): support Ray jobs with Runtime parameter #25867
Changes from 1 commit
804486e
8c219d5
2bdec0c
f56c5c1
304f274
72cc1fa
46140d6
cbaf88c
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 |
---|---|---|
|
@@ -87,6 +87,16 @@ export enum PythonVersion { | |
THREE_NINE = '3.9', | ||
} | ||
|
||
/** | ||
* Runtime | ||
*/ | ||
export enum Runtime { | ||
/** | ||
* Ray 2.4 | ||
*/ | ||
RAY_TWO_FOUR = 'Ray2.4', | ||
} | ||
|
||
/** | ||
* The job type. | ||
* | ||
|
@@ -150,6 +160,12 @@ interface PythonExecutableProps { | |
} | ||
|
||
interface SharedJobExecutableProps { | ||
/** | ||
* Runtime. | ||
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. stronger docs needed. need to know when is runtime required, etc 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. Added bit more information. |
||
* | ||
*/ | ||
readonly runtime?: Runtime; | ||
moomindani marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Glue version. | ||
* | ||
|
@@ -347,6 +363,9 @@ export class JobExecutable { | |
if (config.pythonVersion === PythonVersion.THREE && config.type === JobType.RAY) { | ||
throw new Error('Specified PythonVersion PythonVersion.THREE is not supported for Ray'); | ||
} | ||
if (config.runtime == null && config.type === JobType.RAY) { | ||
moomindani marked this conversation as resolved.
Show resolved
Hide resolved
|
||
throw new Error('Runtime is required for Ray'); | ||
kaizencc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
this.config = config; | ||
} | ||
|
||
|
@@ -388,6 +407,13 @@ export interface JobExecutableConfig { | |
*/ | ||
readonly pythonVersion?: PythonVersion; | ||
|
||
/** | ||
* The Runtime to 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. better docs 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. Our public doc does not have much information about this property, but I tried to add as much as possible. |
||
* | ||
* @default - no runtime specified | ||
*/ | ||
readonly runtime?: Runtime; | ||
|
||
/** | ||
* The script that is executed by a job. | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":"29.0.0"} | ||
{"version":"32.0.0"} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "29.0.0", | ||
"version": "32.0.0", | ||
"testCases": { | ||
"integ.job": { | ||
"stacks": [ | ||
|
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.
This would be a repetitive operation, wondering if we want to move away from enums
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.
should be an enum-like class:
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.
Thanks for sharing the example. Reflected with minor change.