Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion kubeflow/trainer/backends/localprocess/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ def train(
options: list | None = None,
) -> str:
if runtime is None:
raise ValueError("Runtime must be provided for LocalProcessBackend")
available_runtimes = [r.name for r in local_runtimes]
raise ValueError(
f"Runtime must be provided for LocalProcessBackend. "
f"Available runtimes are: {available_runtimes}."
)
if isinstance(runtime, str):
runtime = self.get_runtime(runtime)

Expand Down
5 changes: 4 additions & 1 deletion kubeflow/trainer/backends/localprocess/backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ def test_train(local_backend, mock_train_environment, test_case):
if "rejects kubernetes" in test_case.name:
assert "not compatible with" in error_msg
elif "without runtime" in test_case.name:
assert "Runtime must be provided" in error_msg
assert (
"Runtime must be provided for LocalProcessBackend. Available runtimes are:"
in error_msg
)
elif "without custom trainer" in test_case.name:
assert "CustomTrainer must be set" in error_msg
else:
Expand Down
Loading