rewrite html visualization
This commit is contained in:
parent
6fe5344fa6
commit
88f7f56980
1 changed files with 25 additions and 34 deletions
57
.github/workflows/llm-harness-evaluation.yml
vendored
57
.github/workflows/llm-harness-evaluation.yml
vendored
|
|
@ -233,7 +233,7 @@ jobs:
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/make_table.py results
|
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/make_table.py results
|
||||||
|
|
||||||
# TODO: change machine to store the results later
|
# TODO: change machine to store the results later
|
||||||
llm-harness-summary-html:
|
llm-harness-html:
|
||||||
if: ${{github.event_name == 'schedule' || github.event_name == 'pull_request'}}
|
if: ${{github.event_name == 'schedule' || github.event_name == 'pull_request'}}
|
||||||
needs: [set-matrix, llm-harness-evaluation]
|
needs: [set-matrix, llm-harness-evaluation]
|
||||||
runs-on: ["self-hosted", "llm", "accuracy1", "accuracy-nightly"]
|
runs-on: ["self-hosted", "llm", "accuracy1", "accuracy-nightly"]
|
||||||
|
|
@ -248,54 +248,45 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
pip install jsonlines pytablewriter regex
|
pip install jsonlines pytablewriter regex
|
||||||
|
pip install pandas==1.5.3
|
||||||
|
|
||||||
- name: Set output path
|
- name: Set output path
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
DATE=$(date +%Y-%m-%d)
|
echo "DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
|
||||||
OUTPUT_PATH="results_$DATE"
|
if ${{github.event_name == 'pull_request'}}; then
|
||||||
echo "OUTPUT_PATH=$OUTPUT_PATH" >> $GITHUB_ENV
|
echo 'ACC_FOLDER="/home/arda/harness-action-runners/pr-accuracy-data"' >> $GITHUB_ENV
|
||||||
NIGHTLY_FOLDER="/home/arda/harness-action-runners/nightly-accuracy-data"
|
fi
|
||||||
echo "NIGHTLY_FOLDER=$NIGHTLY_FOLDER" >> $GITHUB_ENV
|
if ${{github.event_name == 'schedule'}}; then
|
||||||
PR_FOLDER="/home/arda/harness-action-runners/pr-accuracy-data"
|
echo 'ACC_FOLDER="/home/arda/harness-action-runners/nightly-accuracy-data"' >> $GITHUB_ENV
|
||||||
echo "PR_FOLDER=$PR_FOLDER" >> $GITHUB_ENV
|
fi
|
||||||
|
|
||||||
- name: Download all results for nightly run
|
- name: Download all results
|
||||||
if: github.event_name == 'schedule'
|
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: harness_results
|
name: harness_results
|
||||||
path: ${{ env.NIGHTLY_FOLDER}}/${{ env.OUTPUT_PATH }}
|
path: ${{ env.ACC_FOLDER}}/${{ env.DATE }}
|
||||||
|
|
||||||
- name: Download all results for pr run
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: harness_results
|
|
||||||
path: ${{ env.PR_FOLDER}}/${{ env.OUTPUT_PATH }}
|
|
||||||
|
|
||||||
# Save fp16.csv in the parent folder of env.nightly_folder
|
# Save fp16.csv in the parent folder of env.nightly_folder
|
||||||
- name: Download fp16.csv for summary
|
- name: Download FP16 results
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/intel-analytics/BigDL/main/python/llm/dev/benchmark/harness/fp16.csv -O ${{ env.NIGHTLY_FOLDER}}/../fp16.csv
|
wget https://raw.githubusercontent.com/intel-analytics/BigDL/main/python/llm/test/benchmark/harness/fp16.csv -O $ACC_FOLDER/../fp16.csv
|
||||||
ls ${{ env.NIGHTLY_FOLDER}}/..
|
ls $ACC_FOLDER/..
|
||||||
|
|
||||||
- name: Summarize the results for nightly run
|
- name: Write to CSV
|
||||||
if: github.event_name == 'schedule'
|
working-directory: ${{ github.workspace }}/python/llm/dev/benchmark/harness
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ls /home/arda/harness-action-runners/nightly-accuracy-data/${{ env.OUTPUT_PATH }}
|
ls $ACC_FOLDER/$DATE
|
||||||
pip install pandas==1.5.3
|
python make_table_and_csv.py $ACC_FOLDER/$DATE $ACC_FOLDER
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/make_table_and_csv.py ${{ env.NIGHTLY_FOLDER}}/${{ env.OUTPUT_PATH }} ${{ env.NIGHTLY_FOLDER}}
|
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/harness_csv_to_html.py -f ${{ env.NIGHTLY_FOLDER}}
|
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/update_html_in_parent_folder.py -f ${{ env.NIGHTLY_FOLDER }}
|
|
||||||
|
|
||||||
- name: Summarize the results for pull request
|
- name: Update HTML
|
||||||
if: github.event_name == 'pull_request'
|
working-directory: ${{ github.workspace }}/python/llm/test/benchmark/harness
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ls /home/arda/harness-action-runners/pr-accuracy-data/${{ env.OUTPUT_PATH }}
|
python harness_csv_to_html.py -f $ACC_FOLDER
|
||||||
pip install pandas==1.5.3
|
if github.event_name == 'schedule'; then
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/make_table_and_csv.py ${{ env.PR_FOLDER}}/${{ env.OUTPUT_PATH }} ${{ env.PR_FOLDER}}
|
python update_html_in_parent_folder.py -f $ACC_FOLDER
|
||||||
python ${{ github.workspace }}/python/llm/dev/benchmark/harness/harness_csv_to_html.py -f ${{ env.PR_FOLDER}}
|
fi
|
||||||
Loading…
Reference in a new issue