-
Notifications
You must be signed in to change notification settings - Fork 0
task(RHOAIENG-26590): Report RayJob status via SDK #2
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
base: cluster-lifecycle-removal
Are you sure you want to change the base?
Conversation
1935573
to
8ec2ec8
Compare
Signed-off-by: Pat O'Connor <[email protected]>
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.
@chipspeak some questions/comments inline. can be addressed elsewhere if needed.
This class provides a simplified interface for submitting and managing | ||
Ray jobs in a Kubernetes cluster with the KubeRay operator installed. | ||
Ray jobs via the Codeflare SDK (using the KubeRay RayJob python client). |
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.
Ray jobs via the Codeflare SDK (using the KubeRay RayJob python client). | |
Rayjob crs (using the KubeRay RayJob python client). |
# Create table with error message | ||
table = _create_info_table("[white on red][bold]Name", job_name, "[bold red]No RayJob found") | ||
table.add_row() | ||
table.add_row("Have you run rayjob.submit() yet?") |
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.
table.add_row("Have you run rayjob.submit() yet?") | |
table.add_row("Please run rayjob.submit() to submit a job") |
Get the status of the Ray job. | ||
Args: | ||
print_to_console: Whether to print formatted status to console (default: True) |
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.
nit
print_to_console: Whether to print formatted status to console (default: True) | |
print_to_console (bool) : Whether to print formatted status to console (default: True) |
|
||
return rayjob_cr | ||
|
||
def status(self, print_to_console: bool = True) -> Tuple[CodeflareRayJobStatus, bool]: |
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.
Question: Should we print to console true by default? I think that means in the output we get the table and an unformatted console print?
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.
In this context its actually how we output the table. It's technically console output (the output section of a notebook in our case) that contains the tables. If we set this to false, it makes the API calls etc but suppresses the output. Means we could still check the return from the call without cluttering a log file if we wanted to.
33368c3
to
17faad7
Compare
Signed-off-by: Pat O'Connor <[email protected]>
17faad7
to
d1be9e8
Compare
No description provided.