Skip to content

Fix ft_launcher Python 3.14 argparse flag#342

Merged
hexinw-nvidia merged 1 commit into
NVIDIA:mainfrom
hexinw-nvidia:python_314
May 22, 2026
Merged

Fix ft_launcher Python 3.14 argparse flag#342
hexinw-nvidia merged 1 commit into
NVIDIA:mainfrom
hexinw-nvidia:python_314

Conversation

@hexinw-nvidia

Copy link
Copy Markdown
Contributor

.

@hexinw-nvidia hexinw-nvidia added the ci-approved Approved to run CI label May 22, 2026
@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a one-line omission in the get_args_parser function where the --ft-ignore-missing-cfg flag was registered with add_argument using only keyword arguments and no option string, which raises an error under Python 3.14's stricter argparse validation.

  • Adds "--ft-ignore-missing-cfg" as the first positional argument to parser.add_argument(...), making the flag properly registered by the parser in all Python versions including 3.14.
  • No logic, behaviour, or other arguments are changed — this is a pure compatibility fix.

Confidence Score: 5/5

Safe to merge — the change is a single-line addition that restores the missing option string for a boolean flag, touching no runtime logic.

The fix is minimal and targeted: adding "--ft-ignore-missing-cfg" as the first argument to an add_argument call that previously had no option string. Without it, Python 3.14's stricter argparse validation raises an error at parser construction time, so the fix is clearly necessary and correct. No other behaviour is altered, and the surrounding argument registrations are unchanged.

No files require special attention — only one line was added to launcher.py and it is straightforwardly correct.

Important Files Changed

Filename Overview
src/nvidia_resiliency_ext/fault_tolerance/launcher.py Adds the missing "--ft-ignore-missing-cfg" option string to an add_argument call that previously had only keyword arguments, fixing a Python 3.14 compatibility error.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[get_args_parser called] --> B[Create ArgumentParser]
    B --> C[Register various ft args]
    C --> D["add_argument with option string added"]
    D --> E{Python version}
    E -->|Before 3.14| F[Silently broken - no option string registered]
    E -->|3.14+| G[Error raised - option string required]
    D -->|After fix| H[Option string present - works on all versions]
    H --> I[Parser returned successfully]
Loading

Reviews (1): Last reviewed commit: "Fix ft_launcher Python 3.14 argparse fla..." | Re-trigger Greptile

@hexinw-nvidia hexinw-nvidia merged commit 6a9dafc into NVIDIA:main May 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved Approved to run CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants