added yml changes

This commit is contained in:
rahat2134
2024-10-20 01:42:57 +05:30
parent 0fdd5c7c2d
commit 16447ba105

View File

@@ -44,6 +44,13 @@ commands:
# Check processes before proceeding
check_processes
# Special handling for dummy engine
if [ "<<parameters.inference_engine>>" = "dummy" ]; then
expected_content="This is a dummy response"
else
expected_content="Michael Jackson"
fi
echo "Sending request to first instance..."
response_1=$(curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
@@ -74,8 +81,8 @@ commands:
kill $PID1 $PID2
echo ""
if ! echo "$response_1" | grep -q "Michael Jackson" || ! echo "$response_2" | grep -q "Michael Jackson"; then
echo "Test failed: Response does not contain 'Michael Jackson'"
if ! echo "$response_1" | grep -q "$expected_content" || ! echo "$response_2" | grep -q "$expected_content"; then
echo "Test failed: Response does not contain '$expected_content'"
echo "Response 1: $response_1"
echo ""
echo "Response 2: $response_2"
@@ -85,7 +92,7 @@ commands:
cat output2.log
exit 1
else
echo "Test passed: Response from both nodes contains 'Michael Jackson'"
echo "Test passed: Response from both nodes contains '$expected_content'"
fi
jobs:
@@ -178,6 +185,28 @@ jobs:
inference_engine: mlx
model_id: llama-3.2-1b
chatgpt_api_integration_test_dummy:
macos:
xcode: "16.0.0"
resource_class: m2pro.large
steps:
- checkout
- run:
name: Set up Python
command: |
brew install python@3.12
python3.12 -m venv env
source env/bin/activate
- run:
name: Install dependencies
command: |
source env/bin/activate
pip install --upgrade pip
pip install .
- run_chatgpt_api_test:
inference_engine: dummy
model_id: dummy-model
test_macos_m1:
macos:
xcode: "16.0.0"
@@ -215,5 +244,6 @@ workflows:
- unit_test
- discovery_integration_test
- chatgpt_api_integration_test_mlx
- chatgpt_api_integration_test_dummy
- test_macos_m1
# - chatgpt_api_integration_test_tinygrad