Skip to content

Honor call=False in import_executor - #650

Merged
ko3n1g merged 1 commit into
NVIDIA-NeMo:mainfrom
rioyu123:codex/import-executor-call-flag
Oct 16, 2026
Merged

ko3n1g merged 1 commit into
NVIDIA-NeMo:mainfrom
rioyu123:codex/import-executor-call-flag

Conversation

@rioyu123

@rioyu123 rioyu123 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

import_executor() documents a call flag but ignores it: if the value is callable, it is always called with the remaining kwargs. So import_executor("gpu", call=False) returns an executor instead of the factory, and a factory with required arguments raises TypeError.

With this change, call=False returns the value without calling it, and the docstring notes that kwargs are unused in that case. The default call=True path is unchanged. Executor instances are still returned as-is with either flag value, and the return annotation is still Executor.

Tests

Local results (Linux, Python 3.11):

  • New tests: five cases using a real temporary executors file. Two are call=False regressions, one of them using a factory with a required argument. The other three are controls for executor instances (with both flag values) and for the default factory call.
  • test_base.py: 2 failed / 19 passed before the fix, 21 passed after.
  • Full suite: 1717 passed, 1 deselected, 1 xfailed. After the summary, Ray prints an ignored atexit ray.dag import error; unmodified main prints the same message.
  • ruff check and ruff format --check pass.

@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Oct 11, 2026
@ko3n1g
ko3n1g enabled auto-merge October 15, 2026 07:51
@ko3n1g
ko3n1g disabled auto-merge October 16, 2026 14:43
@ko3n1g

ko3n1g commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test a999231

@ko3n1g
ko3n1g enabled auto-merge October 16, 2026 14:44
@ko3n1g
ko3n1g added this pull request to the merge queue Oct 16, 2026
Merged via the queue into NVIDIA-NeMo:main with commit 4e6d0f8 Oct 16, 2026
30 checks passed
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-maintainers Waiting on maintainers to respond label Oct 16, 2026

This branch was successfully deployed

1 active deployment
public — a9992319 Deployed Oct 16, 2026 by copy-pr-bot[bot] via release / finalize / publish-docs #423
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.

3 participants