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
3 changes: 1 addition & 2 deletions python/llm/src/ipex_llm/cli/llm-cli
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ while [[ $# -gt 0 ]]; do
case "$1" in
-h | --help)
display_help
filteredArguments+=("'$1'")
shift
exit 0
;;
-x | --model_family | --model-family)
model_family="$2"
Expand Down
11 changes: 11 additions & 0 deletions python/llm/test/cli/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import subprocess
import os

def test_llm_cli_help_fix():
"""
Tests that the llm-cli script exits gracefully after the fix.
"""
cli_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../src/ipex_llm/cli/llm-cli'))
result = subprocess.run([cli_path, "--help"], capture_output=True, text=True)
assert "Invalid model_family" not in result.stdout
assert result.returncode == 0