Skip to content

feat: add ActiveDeadlineSeconds option for TrainJob configuration#415

Open
XploY04 wants to merge 2 commits intokubeflow:mainfrom
XploY04:feat/active-deadline-seconds
Open

feat: add ActiveDeadlineSeconds option for TrainJob configuration#415
XploY04 wants to merge 2 commits intokubeflow:mainfrom
XploY04:feat/active-deadline-seconds

Conversation

@XploY04
Copy link
Copy Markdown
Contributor

@XploY04 XploY04 commented Mar 22, 2026

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):

Fixes #403

Checklist:

  • Docs included if any changes are user facing

Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
Copilot AI review requested due to automatic review settings March 22, 2026 19:23
@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 astefanutti 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Kubernetes-only option to configure .spec.activeDeadlineSeconds on TrainJob resources, and threads that value through the Kubernetes backend spec generation.

Changes:

  • Introduces ActiveDeadlineSeconds option with validation and application into the TrainJob spec.
  • Propagates activeDeadlineSeconds through KubernetesBackend.train() into the generated TrainJob spec.
  • Adds unit tests covering option application, backend compatibility, and invalid (non-positive) values.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
kubeflow/trainer/options/kubernetes.py Adds ActiveDeadlineSeconds option and applies it to .spec.activeDeadlineSeconds with backend validation.
kubeflow/trainer/options/init.py Exports ActiveDeadlineSeconds from the options package.
kubeflow/trainer/options/kubernetes_test.py Extends option validation/application tests and adds validation tests for invalid seconds.
kubeflow/trainer/backends/kubernetes/backend.py Plumbs activeDeadlineSeconds from option-produced spec into TrainJobSpec creation.
kubeflow/trainer/backends/kubernetes/backend_test.py Adds backend tests asserting activeDeadlineSeconds is present on the produced TrainJob spec.

…er values

Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
@XploY04
Copy link
Copy Markdown
Contributor Author

XploY04 commented Mar 24, 2026

/retest

@google-oss-prow
Copy link
Copy Markdown
Contributor

@XploY04: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@XploY04
Copy link
Copy Markdown
Contributor Author

XploY04 commented Mar 24, 2026

@andreyvelich can you review this ? the failing tests are because of the know issue, which will be solved after merging of kubeflow/trainer#3365 this pr.

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.

Add support of active_deadline_seconds to kubeflow sdk

2 participants