Skip to content
Merged
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
36 changes: 1 addition & 35 deletions .github/workflows/model_test_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ env:
jobs:
Evaluation-Workflow:
runs-on: aise-cluster-cpu
timeout-minutes: 10
strategy:
matrix:
include:
Expand Down Expand Up @@ -113,46 +114,11 @@ jobs:
cd ${{ env.OUT_SCRIPT_PATH }}
ls -R

- name: Download Reference Artifact
id: download-artifact
uses: dawidd6/[email protected]
with:
workflow: model_test_cpu.yml
name: FinalReport
run_id: ${{ vars.ModelTest_CPU_REF_ID }}
path: ${{ env.OUT_SCRIPT_PATH }}
name_is_regexp: true
repo: ${{ github.repository }}
check_artifacts: false
search_artifacts: false
skip_unpack: false
if_no_artifact_found: warn

- name: Display structure of downloaded files
run: cd ${{ env.OUT_SCRIPT_PATH }}/log && ls -R

- name: Generate report
run: |
echo "------ Generating final report.html ------"
cd ${{ env.OUT_SCRIPT_PATH }}
mkdir -p generated
/usr/bin/bash -x generate_report.sh
env:
RUN_DISPLAY_URL: https://https://github.com/opea-project/GenAIEval/actions/runs/${{ github.run_id }}
BUILD_NUMBER: ${{ github.run_id }}
JOB_STATUS: succeed

- name: Publish Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: FinalReport
path: ${{ env.OUT_SCRIPT_PATH }}/generated

- name: Specify performance regression
if: ${{ !cancelled() }}
run: |
if [ ${{ env.is_perf_reg }} == 'true' ]; then
echo "[Performance Regression] Some model performance regression occurred, please check artifacts and reports."
exit 1
fi
36 changes: 1 addition & 35 deletions .github/workflows/model_test_hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ env:
jobs:
Evaluation-Workflow:
runs-on: aise-cluster-hpu
timeout-minutes: 10
strategy:
matrix:
include:
Expand Down Expand Up @@ -114,46 +115,11 @@ jobs:
cd ${{ env.OUT_SCRIPT_PATH }}
ls -R

- name: Download Reference Artifact
id: download-artifact
uses: dawidd6/[email protected]
with:
workflow: model_test_hpu.yml
name: FinalReport
run_id: ${{ vars.ModelTest_HPU_REF_ID }}
path: ${{ env.OUT_SCRIPT_PATH }}
name_is_regexp: true
repo: ${{ github.repository }}
check_artifacts: false
search_artifacts: false
skip_unpack: false
if_no_artifact_found: warn

- name: Display structure of downloaded files
run: cd ${{ env.OUT_SCRIPT_PATH }}/log && ls -R

- name: Generate report
run: |
echo "------ Generating final report.html ------"
cd ${{ env.OUT_SCRIPT_PATH }}
mkdir -p generated
/usr/bin/bash -x generate_report.sh
env:
RUN_DISPLAY_URL: https://https://github.com/opea-project/GenAIEval/actions/runs/${{ github.run_id }}
BUILD_NUMBER: ${{ github.run_id }}
JOB_STATUS: succeed

- name: Publish Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: FinalReport
path: ${{ env.OUT_SCRIPT_PATH }}/generated

- name: Specify performance regression
if: ${{ !cancelled() }}
run: |
if [ ${{ env.is_perf_reg }} == 'true' ]; then
echo "[Performance Regression] Some model performance regression occurred, please check artifacts and reports."
exit 1
fi
35 changes: 20 additions & 15 deletions .github/workflows/scripts/models/collect_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,39 @@

set -eo pipefail
set -x
source /GenAIEval/.github/workflows/scripts/change_color

WORKSPACE="/GenAIEval"
# get parameters
PATTERN='[-a-zA-Z0-9_]*='
PERF_STABLE_CHECK=true
for i in "$@"; do
case $i in
--datasets*)
datasets=`echo $i | sed "s/${PATTERN}//"`;;
--device=*)
device=`echo $i | sed "s/${PATTERN}//"`;;
--model=*)
model=`echo $i | sed "s/${PATTERN}//"`;;
--tasks=*)
tasks=`echo $i | sed "s/${PATTERN}//"`;;
*)
echo "Parameter $i not recognized."; exit 1;;
--datasets*)
datasets=$(echo $i | sed "s/${PATTERN}//")
;;
--device=*)
device=$(echo $i | sed "s/${PATTERN}//")
;;
--model=*)
model=$(echo $i | sed "s/${PATTERN}//")
;;
--tasks=*)
tasks=$(echo $i | sed "s/${PATTERN}//")
;;
*)
echo "Parameter $i not recognized."
exit 1
;;
esac
done

log_file="/log/${device}/${model}/${device}-${tasks}-${model}-${datasets}.log"
$BOLD_YELLOW && echo "-------- Collect logs --------" && $RESET

echo "Collecting logs ......"
echo "working in"
pwd
if [[ ! -f ${log_file} ]]; then
echo "${device};${model};${tasks};${datasets};;" >> ${WORKSPACE}/summary.log
echo "|${device}|${model}|${tasks}|${datasets}|NaN|" >>${WORKSPACE}/summary.log
else
acc=$(grep -Po "acc .*(\d+(\.\d+)?)" ${log_file} | awk -F "|" '{print $3}' | head -n 1 | sed 's/.*://;s/[^0-9.]//g')
echo "${device};${model};${tasks};${datasets};${acc};" >> ${WORKSPACE}/summary.log
echo "|${device}|${model}|${tasks}|${datasets}|${acc}|" >>${WORKSPACE}/summary.log
fi
Loading