Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 11, 2024
1 parent 72c7a26 commit 9bbdae6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/model_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Model Test

on:
Expand Down Expand Up @@ -27,7 +41,7 @@ jobs:
task: "hellaswag"
device: "cpu"
fail-fast: true

steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
Expand Down Expand Up @@ -96,4 +110,4 @@ jobs:
name: ${{ matrix.device }}-${{ matrix.modelName }}
path: ${{ github.workspace }}/${{ matrix.device }}/${{ matrix.modelName }}
if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn`
retention-days: 60 # 1 <= retention-days <= 90
retention-days: 60 # 1 <= retention-days <= 90
16 changes: 15 additions & 1 deletion .github/workflows/scripts/models/collect_log.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail
source /GenAIEval/.github/workflows/script/change_color.sh

Expand Down Expand Up @@ -31,4 +45,4 @@ else
logfile=${log_file##*/}
logfile=${logs_prefix_url}${logfile}
echo "${framework},${mode},${model},${throughput},${precision},${logfile}" >> ${WORKSPACE}/summary.log
fi
fi
18 changes: 16 additions & 2 deletions .github/workflows/scripts/models/model_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail
source /GenAIEval/.github/workflows/script/change_color.sh

Expand Down Expand Up @@ -35,7 +49,7 @@ function prepare() {
echo "Working in ${working_dir}"
echo -e "\nInstalling model requirements..."
if [ -f "requirements.txt" ]; then
python -m pip install -r requirements.txt
python -m pip install -r requirements.txt
pip list
else
echo "Not found requirements.txt file."
Expand All @@ -53,7 +67,7 @@ function run_benchmark() {
--device ${device} \
--batch_size 8
2>&1 | tee ${overall_log}

status=$?
if [ ${status} != 0 ]; then
echo "Evaluation process returned non-zero exit code."
Expand Down

0 comments on commit 9bbdae6

Please sign in to comment.