Skip to content

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

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

fix(cli): preserve Windows drives in config section paths#598
rioyu123 wants to merge 1 commit 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>
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.

Windows drive letters are parsed as config section delimiters

1 participant