Skip to content

fix(cli): preserve Windows drives in config section paths - #598

Open
rioyu123 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
rioyu123:codex/fix-windows-config-section-paths
Open

rioyu123 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
rioyu123:codex/fix-windows-config-section-paths

Conversation

@rioyu123

Copy link
Copy Markdown

What changed

Config paths support an optional :section suffix, but the current split treats the colon in a Windows drive letter as that delimiter. This centralizes the split so drive and UNC prefixes stay attached to the path, then reuses it for config export, dictionary export, path detection, and lazy @config loading.

The existing section syntax from #182 is unchanged: C:\tmp\config.yaml:model resolves to C:\tmp\config.yaml plus section model. The lazy loader also keeps its existing section-name validation while allowing normal Windows paths, including paths with spaces.

I also made the export error assertion use the actual captured FileNotFoundError, since the rendered message is platform-specific.

Validation

  • uv run -- pytest test/cli test/test_config.py test/run/test_experiment.py -q — 460 passed
  • uv run ruff check nemo_run/cli/_paths.py nemo_run/cli/config.py nemo_run/cli/api.py nemo_run/cli/lazy.py test/cli/test_config_paths.py test/cli/test_api.py
  • uv run ruff format --check nemo_run/cli/_paths.py test/cli/test_config_paths.py
  • git diff --check

Closes #597

Signed-off-by: Rio Yu <52408936+rioyu123@users.noreply.github.com>
Signed-off-by: Rio Yu <52408936+rioyu123@users.noreply.github.com>
@rioyu123

Copy link
Copy Markdown
Author

Merged current main (b85eb67) without changing the path-parsing fix or rewriting the branch history.

Validation on the updated tree:

  • Windows: 460 CLI, config, and experiment tests passed; changed-file lint passed.
  • Linux, with the SkyPilot extra: 1,413 passed, 1 deselected, 1 xfailed. Pytest exited successfully, followed by an ignored Ray shutdown callback error about ray.dag; I have not established whether that dependency warning also occurs on main.

The full Windows suite still cannot collect because SkyPilot imports the POSIX-only resource module. This PR does not add Windows support to those executors.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-request waiting-on-maintainers Waiting on maintainers to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows drive letters are parsed as config section delimiters

2 participants