diff --git a/.github/workflows/model_test.yml b/.github/workflows/model_test.yml index 052507e5..7a481c8b 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}}/* @@ -98,4 +112,4 @@ jobs: ${{ github.workspace }}/${{ matrix.device }}/${{ matrix.modelName }} ${{ github.workspace }}/.summary.log 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 57c516f8..f6a68330 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 WORKSPACE="/GenAIEval" @@ -28,4 +42,4 @@ if [[ ! -f ${output_file} ]]; then else acc=$(grep -Po "Accuracy .* is:\\s+(\\d+(\\.\\d+)?)" ${acc_log_name} | head -n 1 | sed 's/.*://;s/[^0-9.]//g') echo "${device};${model};${task};${acc};${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."