Skip to content

Commit 8325ba6

Browse files
committed
fix(perf): handle older nemo_run without pod_annotations in RunAIPlugin
Older nemo_run versions (e.g. 0.9.0rc0) expose `annotations` instead of `pod_annotations` on KubeflowExecutor. Fall back gracefully so the plugin works on clusters that haven't upgraded nemo_run yet. Signed-off-by: Rafael M. Koike <koike.rafael@gmail.com>
1 parent cbb0dfd commit 8325ba6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/performance/utils/csp_plugins.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ def setup(self, task: Union["run.Partial", "run.Script"], executor: "run.Executo
152152
executor.extra_resource_limits = {**executor.extra_resource_limits, **self.extended_resources}
153153

154154
if self.annotations:
155-
executor.pod_annotations = {**executor.pod_annotations, **self.annotations}
155+
if hasattr(executor, "pod_annotations"):
156+
executor.pod_annotations = {**executor.pod_annotations, **self.annotations}
157+
else:
158+
executor.annotations = {**executor.annotations, **self.annotations}
156159

157160
if self.large_shm and not any(v.get("name") == "dshm" for v in executor.volumes):
158161
executor.volumes.append({"name": "dshm", "emptyDir": {"medium": "Memory"}})

0 commit comments

Comments
 (0)