task(RHOAIENG-26590): Report RayJob status via SDK#2
Conversation
1935573 to
8ec2ec8
Compare
Signed-off-by: Pat O'Connor <paoconno@redhat.com>
laurafitzgerald
left a comment
There was a problem hiding this comment.
@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.
| 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.
| 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.
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.
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.
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 <paoconno@redhat.com>
17faad7 to
d1be9e8
Compare
No description provided.