From 9c7d755d65ec0d36ad93f8db67225d9756f8f267 Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Tue, 18 Nov 2025 09:02:25 +0100 Subject: [PATCH] fix(trainer): Remove namespace from ClusterTrainingRuntime exception messages Signed-off-by: Antonin Stefanutti --- kubeflow/trainer/backends/kubernetes/backend.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kubeflow/trainer/backends/kubernetes/backend.py b/kubeflow/trainer/backends/kubernetes/backend.py index 9f5d9816f..776db5354 100644 --- a/kubeflow/trainer/backends/kubernetes/backend.py +++ b/kubeflow/trainer/backends/kubernetes/backend.py @@ -94,7 +94,7 @@ def list_runtimes(self) -> list[types.Runtime]: return result def get_runtime(self, name: str) -> types.Runtime: - """Get the the Runtime object""" + """Get the Runtime object""" try: thread = self.custom_api.get_cluster_custom_object( @@ -111,13 +111,11 @@ def get_runtime(self, name: str) -> types.Runtime: except multiprocessing.TimeoutError as e: raise TimeoutError( - f"Timeout to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: " - f"{self.namespace}/{name}" + f"Timeout to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: {name}" ) from e except Exception as e: raise RuntimeError( - f"Failed to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: " - f"{self.namespace}/{name}" + f"Failed to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: {name}" ) from e return self.__get_runtime_from_cr(runtime) # type: ignore