From 9c2a3c7d27f6831de64b8193298a43ce3596017a Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 9 Jan 2025 14:47:58 -0800 Subject: [PATCH] Modify test call for test_model_registration.py within workflow --- .github/workflows/gha_workflow_llama_stack_tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gha_workflow_llama_stack_tests.yml b/.github/workflows/gha_workflow_llama_stack_tests.yml index 9dc6b19a4c..c850934ddd 100644 --- a/.github/workflows/gha_workflow_llama_stack_tests.yml +++ b/.github/workflows/gha_workflow_llama_stack_tests.yml @@ -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