Skip to content

Commit

Permalink
Modify test call for test_model_registration.py within workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorHack committed Jan 9, 2025
1 parent fa99fbf commit 9c2a3c7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/gha_workflow_llama_stack_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,17 @@ jobs:
for file in "$dir"/test_*.py; do
test_name=$(basename "$file")
new_file="result-${dir_name}-${test_name}.xml"
if torchrun $(which pytest) -s -v ${TESTS_PATH}/${dir_name}/${test_name} -m "${PROVIDER_ID} and ${MODEL_ID}" \
#TODO
# Add if test_name = test_model_registration.py then echo "hello"
if [ "$test_name" = "test_model_registration.py" ]; then
echo "Found test_model_registration.py"
if torchrun $(which pytest) -v -s -k "${PROVIDER_ID} --inference-model=${MODEL_ID}" \
--junitxml="${{ github.workspace }}/${new_file}"; then
echo "Ran the test_model_registration.py"
else
echo "Did NOT run the test_model_registration.py"
fi
elif torchrun $(which pytest) -s -v ${TESTS_PATH}/${dir_name}/${test_name} -m "${PROVIDER_ID} and ${MODEL_ID}" \
--junitxml="${{ github.workspace }}/${new_file}"; then
echo "Ran test: ${test_name}"
else
Expand Down

0 comments on commit 9c2a3c7

Please sign in to comment.