Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index/src/pixelrag_index/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ def main():
)
parser.add_argument("--output", "-o", default=None, help="Output directory")
parser.add_argument(
"--device", default=None, choices=["cpu", "cuda"], help="Embedding device"
"--device",
default=None,
choices=["auto", "cpu", "mps", "cuda"],
help="Embedding device (default: from config; auto-detects cuda/mps/cpu)",
)
parser.add_argument(
"--limit", "-n", type=int, default=None, help="Max documents to process"
Expand Down
8 changes: 8 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ def test_pixelrag_umbrella_help():
assert stage in out


def test_index_build_device_choices():
# CLI must offer every device the embedder supports (auto/mps were missing).
# Assert the argparse-rendered choices token, not loose words in the help prose.
r = _run("pixelrag", "index", "build", "--help")
assert r.returncode == 0
assert "{auto,cpu,mps,cuda}" in r.stdout


def test_pixelrag_unknown_stage_errors():
r = _run("pixelrag", "definitely-not-a-stage")
assert r.returncode != 0
Expand Down
Loading