Skip to content

feat(trainer): add tail_lines support to get_job_logs - #686

Open
Sumitha007 wants to merge 2 commits into
kubeflow:mainfrom
Sumitha007:feat-log-streaming-tail-support
Open

feat(trainer): add tail_lines support to get_job_logs#686
Sumitha007 wants to merge 2 commits into
kubeflow:mainfrom
Sumitha007:feat-log-streaming-tail-support

Conversation

@Sumitha007

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR adds tail_lines support to TrainerClient.get_job_logs() and propagates it through all Trainer backends.

Changes

  • Add tail_lines: int | None = None to TrainerClient.get_job_logs().
  • Propagate the new parameter through the RuntimeBackend interface.
  • Support tail_lines in the Kubernetes backend by forwarding it to the Kubernetes Pod Logs API.
  • Support tail_lines in the Container backend and Docker/Podman adapters.
  • Support tail_lines in the LocalProcess backend and LocalJob.logs().
  • Preserve existing behavior when tail_lines is not specified.

Which issue(s) this PR fixes:

Fixes #682

Checklist:

  • Docs included if any changes are user facing

@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

Signed-off-by: Sumitha007 <jsumitha012@gmail.com>
@Sumitha007
Sumitha007 force-pushed the feat-log-streaming-tail-support branch from a6274ef to 312145f Compare July 30, 2026 04:24
Signed-off-by: Sumitha007 <jsumitha012@gmail.com>
@Sumitha007
Sumitha007 force-pushed the feat-log-streaming-tail-support branch from db594a8 to d0cf7d7 Compare July 30, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(trainer): Add log streaming and tailing support to TrainerClient.get_job_logs()

1 participant