From 4f5f66e99e1140cfce2c56036ca5bfeb377edcf6 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 24 Jul 2026 09:41:04 -0500 Subject: [PATCH] fix: correct return type annotation of get_nsys_entrypoint get_nsys_entrypoint returns a tuple (nsys, ), but its annotation was str. Update the annotation to tuple[str, str] to match the implementation and callers that unpack the result. Signed-off-by: Andrew White Signed-off-by: andrewwhitecdw --- nemo_run/core/execution/base.py | 2 +- nemo_run/core/execution/slurm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nemo_run/core/execution/base.py b/nemo_run/core/execution/base.py index 870ea8bb..cfc02a2c 100644 --- a/nemo_run/core/execution/base.py +++ b/nemo_run/core/execution/base.py @@ -165,7 +165,7 @@ def get_launcher_prefix(self) -> Optional[list[str]]: os.makedirs(os.path.join(self.job_dir, launcher.nsys_folder), exist_ok=True) return launcher.get_nsys_prefix(profile_dir=self.job_dir) - def get_nsys_entrypoint(self) -> str: + def get_nsys_entrypoint(self) -> tuple[str, str]: return ("nsys", "") def supports_launcher_transform(self) -> bool: diff --git a/nemo_run/core/execution/slurm.py b/nemo_run/core/execution/slurm.py index 2a794e30..4f6f5d0a 100644 --- a/nemo_run/core/execution/slurm.py +++ b/nemo_run/core/execution/slurm.py @@ -561,7 +561,7 @@ def get_launcher_prefix(self) -> Optional[list[str]]: nsys_prefix += ["$GPU_METRICS_FLAG"] return nsys_prefix - def get_nsys_entrypoint(self) -> str: + def get_nsys_entrypoint(self) -> tuple[str, str]: launcher = self.get_launcher() entrypoint, postfix = "nsys", "" if launcher.nsys_gpu_metrics: