Skip to content

Commit 9d0f2b6

Browse files
fix: correct return type annotation of get_nsys_entrypoint (NVIDIA-NeMo#568)
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 <andrewh@cdw.com> Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
1 parent 99f1315 commit 9d0f2b6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎nemo_run/core/execution/base.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def get_launcher_prefix(self) -> Optional[list[str]]:
165165
os.makedirs(os.path.join(self.job_dir, launcher.nsys_folder), exist_ok=True)
166166
return launcher.get_nsys_prefix(profile_dir=self.job_dir)
167167

168-
def get_nsys_entrypoint(self) -> str:
168+
def get_nsys_entrypoint(self) -> tuple[str, str]:
169169
return ("nsys", "")
170170

171171
def supports_launcher_transform(self) -> bool:

‎nemo_run/core/execution/slurm.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def get_launcher_prefix(self) -> Optional[list[str]]:
561561
nsys_prefix += ["$GPU_METRICS_FLAG"]
562562
return nsys_prefix
563563

564-
def get_nsys_entrypoint(self) -> str:
564+
def get_nsys_entrypoint(self) -> tuple[str, str]:
565565
launcher = self.get_launcher()
566566
entrypoint, postfix = "nsys", ""
567567
if launcher.nsys_gpu_metrics:

0 commit comments

Comments
 (0)