From e646be63067290dfad6a0896224bfa69df7372e9 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Thu, 12 Dec 2024 22:08:35 +0800 Subject: [PATCH] Change step order Signed-off-by: ZePan110 --- .github/workflows/manual-accuary-test.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/manual-accuary-test.yml b/.github/workflows/manual-accuary-test.yml index a56be6d..8d0db3a 100644 --- a/.github/workflows/manual-accuary-test.yml +++ b/.github/workflows/manual-accuary-test.yml @@ -101,7 +101,7 @@ jobs: fi conda_version=$(conda --version 2>&1) version=$(echo $conda_version | grep -oP 'conda \K[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f2) - if [[ $major_version -ge 6 ]]; then + if [[ $version -ge 6 ]]; then source activate ${conda_env_name} else source ${HOME}/miniforge3/etc/profile.d/conda.sh @@ -120,19 +120,20 @@ jobs: pip install ragas==0.1.19 fi - - name: Launch Service + - name: Evaluation Prepare + shell: bash + if: ${{ matrix.dataset }} == 'en' && ${{ matrix.dataset }} == 'ChatQnA' env: HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }} example: ${{ matrix.example }} dataset: ${{ matrix.dataset }} - # IMAGE_REPO: 100.83.111.229:5000/opea run: | export PATH=${HOME}/miniforge3/bin/:$PATH conda_version=$(conda --version 2>&1) version=$(echo $conda_version | grep -oP 'conda \K[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f2) - if [[ $major_version -ge 6 ]]; then + if [[ $version -ge 6 ]]; then source activate OPEA_acc else source ${HOME}/miniforge3/etc/profile.d/conda.sh @@ -140,22 +141,21 @@ jobs: fi [ ! -d "acc-log" ] && mkdir acc-log cp ${{ github.workspace }}/Validation/.github/scripts/acc_test.sh ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/ - bash ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/acc_test.sh --launch_service "${example}" "${dataset}" | tee ${{ github.workspace }}/acc-log/${example}-${dataset}-launch_service.txt + bash ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/acc_test.sh --eval_prepare "${example}" "${dataset}" | tee ${{ github.workspace }}/acc-log/${example}-${dataset}-eval_prepare.txt - - name: Evaluation Prepare - shell: bash - if: ${{ matrix.dataset }} == 'en' && ${{ matrix.dataset }} == 'ChatQnA' + - name: Launch Service env: HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} HF_TOKEN: ${{ secrets.HF_TOKEN }} example: ${{ matrix.example }} dataset: ${{ matrix.dataset }} + # IMAGE_REPO: 100.83.111.229:5000/opea run: | export PATH=${HOME}/miniforge3/bin/:$PATH conda_version=$(conda --version 2>&1) version=$(echo $conda_version | grep -oP 'conda \K[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f2) - if [[ $major_version -ge 6 ]]; then + if [[ $version -ge 6 ]]; then source activate OPEA_acc else source ${HOME}/miniforge3/etc/profile.d/conda.sh @@ -163,7 +163,7 @@ jobs: fi [ ! -d "acc-log" ] && mkdir acc-log cp ${{ github.workspace }}/Validation/.github/scripts/acc_test.sh ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/ - bash ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/acc_test.sh --eval_prepare "${example}" "${dataset}" | tee ${{ github.workspace }}/acc-log/${example}-${dataset}-eval_prepare.txt + bash ${{ github.workspace }}/GenAIExamples/${example}/benchmark/accuracy/acc_test.sh --launch_service "${example}" "${dataset}" | tee ${{ github.workspace }}/acc-log/${example}-${dataset}-launch_service.txt - name: Run Evaluation env: @@ -177,7 +177,7 @@ jobs: export PATH=${HOME}/miniforge3/bin/:$PATH conda_version=$(conda --version 2>&1) version=$(echo $conda_version | grep -oP 'conda \K[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f2) - if [[ $major_version -ge 6 ]]; then + if [[ $version -ge 6 ]]; then source activate OPEA_acc else source ${HOME}/miniforge3/etc/profile.d/conda.sh