chore(cli): point error messages at the positional 'file'/'object', not --file/--object#555
Open
FileSystemGuy wants to merge 2 commits into
Open
chore(cli): point error messages at the positional 'file'/'object', not --file/--object#555FileSystemGuy wants to merge 2 commits into
FileSystemGuy wants to merge 2 commits into
Conversation
…ot --file/--object The data-access protocol is a positional (registered by `add_storage_type_arguments` in `mlpstorage_py/cli/common_args.py` with `choices=['file', 'object']`). The old `--file` / `--object` flag form was removed when issue #376 was fixed, but several user-facing error messages, help strings, and comments still tell users to type `--file --o-direct` or similar. A user who follows those hints hits: argparse: error: unrecognized arguments: --file This commit replaces every flag-style reference in user-visible error messages and argparse help text with the actual quoted positional, and adds a copy-pasteable example command form. Affected: * `mlpstorage_py/cli/training_args.py` — `--o-direct` rejection messages and the `--o-direct` help text. * `mlpstorage_py/cli/checkpointing_args.py` — same pair. * `mlpstorage_py/cli/kvcache_args.py` — the "only POSIX file storage" rejection message. PR #544 introduced two of the affected `--o-direct` messages most recently; the rest pre-date #376. The flag form remains documented as historical context in `cli_parser.py` and the `test_issue_376_*` test where it intentionally records what was removed. Test assertions in `tests/unit/test_dlio_odirect.py` that previously matched on the literal `--object` / `--file` substrings are updated to match the quoted-positional form (`'object'` / `'file'`) so they verify the new — correct — wording.
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
Previous attempts (run 28269658599 attempts 1 and 2) failed with 'No space left on device' inside the GitHub Runner agent's own diagnostic log path — not a test failure. Sibling PRs in the same time window passed. Forcing a fresh runner draw.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The data-access protocol is a positional (
mlpstorage_py/cli/common_args.py:329—add_storage_type_argumentsregisters it withchoices=['file', 'object']). The old--file/--objectflag form was removed when #376 was fixed.Several user-facing error messages, help strings, and comments still tell users to type
--file --o-director similar. A user who follows those hints types the suggested string and hits:```
argparse: error: unrecognized arguments: --file
```
This PR fixes the user-visible wording in three CLI files and points operators at the actual positional with a copy-pasteable example command form.
Changes
mlpstorage_py/cli/training_args.py—--o-directrejection messages (both branches) and the--o-directargparse help text.mlpstorage_py/cli/checkpointing_args.py— same pair.mlpstorage_py/cli/kvcache_args.py— the "only POSIX file storage" rejection message.Before / after examples:
```
```
PR #544 introduced two of the affected
--o-directmessages most recently; the rest pre-date #376. The flag form remains documented as historical context incli_parser.pyand thetest_issue_376_file_arg_conflict.pytest — those are intentional records of the removal and not changed here.Test updates
Test assertions in
tests/unit/test_dlio_odirect.pythat previously matched on the literal--object/--filesubstrings are updated to match the new quoted-positional form ('object'/'file') so they verify the corrected wording.Test plan