Skip to content

Commit 49a5087

Browse files
authored
fix(trainer): Remove namespace from ClusterTrainingRuntime exception messages (#166)
Signed-off-by: Antonin Stefanutti <[email protected]>
1 parent bc6a135 commit 49a5087

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

kubeflow/trainer/backends/kubernetes/backend.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def list_runtimes(self) -> list[types.Runtime]:
9494
return result
9595

9696
def get_runtime(self, name: str) -> types.Runtime:
97-
"""Get the the Runtime object"""
97+
"""Get the Runtime object"""
9898

9999
try:
100100
thread = self.custom_api.get_cluster_custom_object(
@@ -111,13 +111,11 @@ def get_runtime(self, name: str) -> types.Runtime:
111111

112112
except multiprocessing.TimeoutError as e:
113113
raise TimeoutError(
114-
f"Timeout to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: "
115-
f"{self.namespace}/{name}"
114+
f"Timeout to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: {name}"
116115
) from e
117116
except Exception as e:
118117
raise RuntimeError(
119-
f"Failed to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: "
120-
f"{self.namespace}/{name}"
118+
f"Failed to get {constants.CLUSTER_TRAINING_RUNTIME_PLURAL}: {name}"
121119
) from e
122120

123121
return self.__get_runtime_from_cr(runtime) # type: ignore

0 commit comments

Comments
 (0)