Skip to content

chore(cli): point error messages at the positional 'file'/'object', not --file/--object#555

Open
FileSystemGuy wants to merge 2 commits into
mainfrom
chore/cli-wording-positional-file-object
Open

chore(cli): point error messages at the positional 'file'/'object', not --file/--object#555
FileSystemGuy wants to merge 2 commits into
mainfrom
chore/cli-wording-positional-file-object

Conversation

@FileSystemGuy

Copy link
Copy Markdown
Contributor

Summary

The data-access protocol is a positional (mlpstorage_py/cli/common_args.py:329add_storage_type_arguments registers it with choices=['file', 'object']). The old --file / --object flag form was removed when #376 was fixed.

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 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-direct rejection messages (both branches) and the --o-direct argparse 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:

```

  • ERROR: --o-direct is incompatible with --object.
  • ...
  • Use --file --o-direct for O_DIRECT local I/O.
  • ERROR: --o-direct is incompatible with the 'object' data-access protocol.
  • ...
  • Use the 'file' positional with --o-direct for O_DIRECT local I/O,
  • e.g. `mlpstorage training run file --o-direct`.
    ```

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_file_arg_conflict.py test — those are intentional records of the removal and not changed here.

Test updates

Test assertions in tests/unit/test_dlio_odirect.py that previously matched on the literal --object / --file substrings are updated to match the new quoted-positional form ('object' / 'file') so they verify the corrected wording.

Test plan

  • `pytest tests/unit/test_dlio_odirect.py` — passes (3 assertion updates)
  • `pytest tests/unit/test_dlio_odirect.py tests/unit/test_dlio_object_storage.py tests/unit/test_cli.py tests/unit/test_cli_kvcache.py tests/unit/test_benchmarks_kvcache.py tests/unit/test_help_behavior.py` — 369/369 pass

…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.
@FileSystemGuy FileSystemGuy requested a review from a team June 26, 2026 22:51
@github-actions

Copy link
Copy Markdown

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.
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.

1 participant