feat(trainer): improve DX for LocalProcessBackend missing runtime error#424
feat(trainer): improve DX for LocalProcessBackend missing runtime error#424zannensk wants to merge 1 commit intokubeflow:mainfrom
Conversation
…essBackend Signed-off-by: Zannensk <sqwerd1989@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Improves the LocalProcessBackend developer experience by enhancing the “missing runtime” error to include a dynamically generated list of available runtime names, and updates the corresponding unit test expectation.
Changes:
- Extend the
LocalProcessBackend.train()ValueErrormessage to list available runtimes whenruntimeisNone. - Update
backend_test.pyto assert the new, more informative error message prefix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
kubeflow/trainer/backends/localprocess/backend.py |
Adds available runtime names to the “runtime missing” exception message in train(). |
kubeflow/trainer/backends/localprocess/backend_test.py |
Updates the failing-case assertion to match the new error message prefix. |
What this PR does / why we need it:
While exploring the LocalProcessBackend as part of my GSoC proposal preparation, I noticed that the error message when a runtime is missing is quite opaque (
ValueError: Runtime must be provided).This PR improves the Developer Experience (DX) by dynamically listing the available runtimes (e.g., 'torch-distributed') within the error message. This helps newcomers quickly identify the correct runtime string without deep-diving into the source code.
Checklist:
make verifyand it passed.make test-pythonand all tests passed.