Skip to content

feat(trainer): preview TrainJob before submission - #895

Open
RobuRishabh wants to merge 1 commit into
kubeflow:mainfrom
RobuRishabh:feat/preview-trainer-TrainJob-before-submission
Open

RobuRishabh wants to merge 1 commit into
kubeflow:mainfrom
RobuRishabh:feat/preview-trainer-TrainJob-before-submission

Conversation

@RobuRishabh

Copy link
Copy Markdown

What this PR does / why we need it:

Adds TrainerClient.preview_train_job() for inspecting the exact Kubernetes TrainJob resource before submission.

Preview and submission now share the same resource builder. Preview performs no create request, while runtime resolution may still read from the cluster. Unsupported backends raise NotImplementedError.

The API documentation clarifies that a fixed Name option is required to compare separate preview and submission calls and that preview does not perform server-side validation.

Which issue(s) this PR fixes:

Fixes #847

Checklist:

  • Docs included if any changes are user facing

Add TrainerClient.preview_train_job() to inspect the exact Kubernetes
TrainJob resource without creating it.

Reuse a shared resource builder for preview and submission, document
preview limitations, and reject unsupported backends. Add tests ensuring
preview performs no create request and matches the submitted body when
using a fixed job name.

Signed-off-by: roburishabh <roburishabh@outlook.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:16
@github-project-automation github-project-automation Bot moved this to Ready to Merge in Kubeflow SDK Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kramaranya for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@RobuRishabh RobuRishabh moved this from Ready to Merge to In Progress in Kubeflow SDK Oct 22, 2026
@RobuRishabh

RobuRishabh commented Oct 22, 2026 •

Copy link
Copy Markdown
Author

Hello @robert-bell can I get your review/thoughts here, PTAL. Thanks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Preview a Trainer TrainJob before submission

2 participants