Skip to content

task(RHOAIENG-26590): Report RayJob status via SDK#2

Draft
chipspeak wants to merge 6 commits into
cluster-lifecycle-removalfrom
RHOAIENG-26590
Draft

task(RHOAIENG-26590): Report RayJob status via SDK#2
chipspeak wants to merge 6 commits into
cluster-lifecycle-removalfrom
RHOAIENG-26590

Conversation

@chipspeak

Copy link
Copy Markdown
Owner

No description provided.

@chipspeak chipspeak force-pushed the RHOAIENG-26590 branch 3 times, most recently from 1935573 to 8ec2ec8 Compare July 29, 2025 17:22

@laurafitzgerald laurafitzgerald left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread src/codeflare_sdk/ray/rayjobs/rayjob.py Outdated

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).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
table.add_row("Have you run rayjob.submit() yet?")
table.add_row("Please run rayjob.submit() to submit a job")

Comment thread src/codeflare_sdk/ray/rayjobs/rayjob.py Outdated
Get the status of the Ray job.

Args:
print_to_console: Whether to print formatted status to console (default: True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
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)

Comment thread src/codeflare_sdk/ray/rayjobs/rayjob.py Outdated

return rayjob_cr

def status(self, print_to_console: bool = True) -> Tuple[CodeflareRayJobStatus, bool]:

Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Owner Author

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.

@chipspeak chipspeak force-pushed the RHOAIENG-26590 branch 8 times, most recently from 33368c3 to 17faad7 Compare July 30, 2025 14:09
github-actions Bot and others added 2 commits July 30, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants