• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeflow / sdk / 20780172530
67%

Build:
DEFAULT BRANCH: main
Ran 07 Jan 2026 11:37AM UTC
Jobs 2
Files 58
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jan 2026 11:36AM UTC coverage: 66.607% (-0.1%) from 66.736%
20780172530

push

github

web-flow
feat(trainer): add get_job_events API to retrieve TrainJob events (#220)

* feat(trainer): add get_job_events() API to retrieve TrainJob events

- Add Event dataclass to represent Kubernetes events with fields: involved_object_kind, involved_object_name, message, reason, event_time, first_occurrence, last_occurrence, count, and type
- Implement get_job_events() method in TrainerClient to provide users with visibility into TrainJob state changes and pod events
- Add abstract method get_job_events() to RuntimeBackend base class
- Implement get_job_events() for KubernetesBackend with proper event filtering and sorting
- Implement get_job_events() for LocalProcessBackend and ContainerBackend (return empty list as events are Kubernetes-specific)
- Add comprehensive unit tests for the new functionality

This addresses issue #196 by providing an API for users to check TrainJob events, giving additional clarity about the state when logs alone are insufficient.

Related-To: #196
Signed-off-by: Aditya Shirsatrao <adityashirsatrao007@gmail.com>

* Update kubeflow/trainer/backends/kubernetes/backend.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aditya <adityashirsatrao007@gmail.com>

* Update kubeflow/trainer/backends/kubernetes/backend.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aditya <adityashirsatrao007@gmail.com>

* fix: Error handling consistent

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>

* fix: Error handling consistent

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>

* Pre-commit test failure fix

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>

* Args for docstring in Event class

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>

* test mock events API and align timeout handling

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>

* only handle timeout error from the list_namespaced_event() API

Signed-off-by: sksingh2005 <shashanksgh3@gmail.com>
... (continued)

48 of 81 new or added lines in 7 files covered. (59.26%)

1 existing line in 1 file now uncovered.

2599 of 3902 relevant lines covered (66.61%)

1.33 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
69.05
-0.95% kubeflow/trainer/api/trainer_client.py
1
71.43
-1.3% kubeflow/trainer/backends/base.py
2
96.12
-0.5% kubeflow/trainer/backends/kubernetes/backend_test.py
3
0.0
0.0% kubeflow/optimizer/api/optimizer_client.py
4
79.63
0.28% kubeflow/trainer/backends/kubernetes/backend.py
22
0.0
0.0% kubeflow/optimizer/backends/kubernetes/backend.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% kubeflow/optimizer/backends/kubernetes/backend.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.11 - 20780172530.1 07 Jan 2026 11:37AM UTC 58
66.57
GitHub Action Run
2 python-3.9 - 20780172530.2 07 Jan 2026 11:37AM UTC 58
66.61
GitHub Action Run
Source Files on build 20780172530
  • Tree
  • List 58
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20780172530
  • 3e8988a8 on github
  • Prev Build on main (#20719761526)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc