From 9bbdae68b55eb7ba8d0fc0bbc63d39db88c74eac Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 08:46:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/model_test.yml | 18 ++++++++++++++++-- .../workflows/scripts/models/collect_log.sh | 16 +++++++++++++++- .github/workflows/scripts/models/model_test.sh | 18 ++++++++++++++++-- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/.github/workflows/model_test.yml b/.github/workflows/model_test.yml index 7d39459c..961c19c2 100644 --- a/.github/workflows/model_test.yml +++ b/.github/workflows/model_test.yml @@ -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: @@ -27,7 +41,7 @@ jobs: task: "hellaswag" device: "cpu" fail-fast: true - + steps: - name: Clean Up Working Directory run: sudo rm -rf ${{github.workspace}}/* @@ -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 \ No newline at end of file + retention-days: 60 # 1 <= retention-days <= 90 diff --git a/.github/workflows/scripts/models/collect_log.sh b/.github/workflows/scripts/models/collect_log.sh index 4b14eaa0..db28f099 100644 --- a/.github/workflows/scripts/models/collect_log.sh +++ b/.github/workflows/scripts/models/collect_log.sh @@ -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 @@ -31,4 +45,4 @@ else logfile=${log_file##*/} logfile=${logs_prefix_url}${logfile} echo "${framework},${mode},${model},${throughput},${precision},${logfile}" >> ${WORKSPACE}/summary.log -fi \ No newline at end of file +fi diff --git a/.github/workflows/scripts/models/model_test.sh b/.github/workflows/scripts/models/model_test.sh index 459659de..fae21add 100644 --- a/.github/workflows/scripts/models/model_test.sh +++ b/.github/workflows/scripts/models/model_test.sh @@ -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 @@ -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." @@ -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."