Skip to content

Require an output directory for the FSDP2 visualiser - #4624

Open
yuefdev wants to merge 1 commit into
huggingface:mainfrom
yuefdev:fix/fsdp2-visualizer-require-output-dir
Open

yuefdev wants to merge 1 commit into
huggingface:mainfrom
yuefdev:fix/fsdp2-visualizer-require-output-dir

Conversation

@yuefdev

@yuefdev yuefdev commented Dec 3, 2026

Copy link
Copy Markdown

What does this PR do?

The FSDP2 benchmark visualiser opens a file under None/ when --dir is omitted. Make --dir required so the CLI prints usage and names the missing argument before opening any files. The documented invocation is unchanged.

Fixes #4623

Validation

  • python -m pytest -q tests/test_cli.py -k "fsdp2_visualizer or LaunchArgTester": 4 passed. The new test failed on main with a FileNotFoundError.
  • python benchmarks/fsdp2/visualize.py --help exits successfully. With --dir and four small fixture files, the script produced valid allocated_memory.png and reserved_memory.png files. I did not run the GPU benchmark that generates the inputs.
  • uvx ruff@0.13.1 check . and uvx ruff@0.13.1 format --check . passed (the make quality checks, run directly on Windows).

Use case

I don't have a use case

Who can review?

cc @SunMarc

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FSDP2 memory visualizer treats an omitted --dir as a directory named None

1 participant