Skip to content

fix: correct return type annotation of get_nsys_entrypoint - #568

Merged
ko3n1g merged 2 commits into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/get-nsys-entrypoint-return-type
Aug 19, 2026
Merged

fix: correct return type annotation of get_nsys_entrypoint#568
ko3n1g merged 2 commits into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/get-nsys-entrypoint-return-type

Conversation

@andrewwhitecdw

Copy link
Copy Markdown
Contributor

Bug

get_nsys_entrypoint returns a tuple ("nsys", ""), but its annotation was str. This mismatched the implementation and callers that unpack the result.

Fix

Update the return type annotation to tuple[str, str].

Test

The existing TestExecutor::test_get_nsys_entrypoint already asserts the tuple return value.

Verification

uv run pytest test/core/execution/test_base.py::TestExecutor::test_get_nsys_entrypoint -v passes. uv run --group lint ruff check ... and ruff format --check ... pass.

Copy link
Copy Markdown
Contributor

PR #568 — needs attention
Blocking finding: nemo_run/core/execution/slurm.py:564-570 still annotates its override as returning str, although it returns the same two-string tuple as the corrected base method and is tuple-unpacked by nemo_run/run/torchx_backend/packaging.py:253. Update the override to tuple[str, str] so concrete SlurmExecutor use is typed correctly.
Non-blocking findings: None.
Validation gaps: Runtime tuple tests exist, but they do not catch this annotation mismatch. Only DCO is reported.

@ko3n1g

ko3n1g commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

hey @andrewwhitecdw, could you fix the type hint? I'll get it merged afterwards. Thanks for the contribution!

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Aug 7, 2026
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>
@andrewwhitecdw
andrewwhitecdw force-pushed the andrewwhitecdw/fix/get-nsys-entrypoint-return-type branch from d5d6bfd to 4f5f66e Compare August 10, 2026 19:21
@andrewwhitecdw

Copy link
Copy Markdown
Contributor Author

Fixed the same mismatch in the Slurm override as well. Both the base Executor and SlurmExecutor now annotate get_nsys_entrypoint as tuple[str, str], matching their implementations. CI lint/test passed locally.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added waiting-on-maintainers Waiting on maintainers to respond and removed waiting-on-customer Waiting on the original author to respond labels Aug 10, 2026
@ko3n1g

ko3n1g commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

/ok to test

@ko3n1g
ko3n1g enabled auto-merge (squash) August 19, 2026 00:54

@ko3n1g ko3n1g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ko3n1g
ko3n1g merged commit 9d0f2b6 into NVIDIA-NeMo:main Aug 19, 2026
20 checks passed
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-maintainers Waiting on maintainers to respond label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants