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 31, 2024
1 parent a36a46b commit 5c15487
Show file tree
Hide file tree
Showing 31 changed files with 93 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/code_scan.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Code Scan

on:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/model_test_cpu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Model Test on CPU

on:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/model_test_hpu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Model Test on HPU

on:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/codeScan/bandit.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source /GenAIEval/.github/workflows/scripts/change_color
log_dir=/GenAIEval/.github/workflows/scripts/codeScan
python -m bandit -r -lll -iii /GenAIEval >${log_dir}/bandit.log
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/codeScan/trellix.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source ${workspace}/.github/workflows/scripts/change_color
log_dir=${workspace}/.github/workflows/scripts/codeScan

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/models/collect_log.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -eo pipefail
set -x
source /GenAIEval/.github/workflows/scripts/change_color
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/models/generate_report.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -x
WORKSPACE=generated
last_log_path=FinalReport
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/models/model_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -o pipefail
set -x
source /GenAIEval/.github/workflows/scripts/change_color
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/trellix.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source ${workspace}/.github/workflows/scripts/change_color
log_dir=${workspace}/.github/workflows/scripts/codeScan

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/unittest/calc_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source ../../change_color
LOG_DIR=$1
coverage_compare="${LOG_DIR}/coverage_compare.html"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/unittest/compare_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

output_file=$1
coverage_pr_log=$2
coverage_base_log=$3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/unittest/unittest.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash


# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source /GenAIEval/.github/workflows/scripts/change_color
export COVERAGE_RCFILE="/GenAIEval/.github/workflows/scripts/unittest/coveragerc"
LOG_DIR=/GenAIEval/log_dir
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/trellix.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Trellix Command Line Scanner

on:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: UnitTest

on:
Expand Down
3 changes: 3 additions & 0 deletions evals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
3 changes: 3 additions & 0 deletions evals/evaluation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
3 changes: 3 additions & 0 deletions evals/evaluation/bigcode_evaluation_harness/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

from .accuracy import evaluate
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/bigcode_evaluation_harness/accuracy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
import fnmatch
import json
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/bigcode_evaluation_harness/arguments.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
import fnmatch

Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/bigcode_evaluation_harness/examples/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
from evals.evaluation.bigcode_evaluation_harness import evaluate, setup_parser

Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

from .accuracy import cli_evaluate as evaluate
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/accuracy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import json
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/arguments.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import argparse
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/examples/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

from evals.evaluation.lm_evaluation_harness import evaluate, setup_parser
Expand Down
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/lm_eval/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#
3 changes: 3 additions & 0 deletions evals/evaluation/lm_evaluation_harness/lm_eval/evaluator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import itertools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

from . import huggingface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import copy
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import subprocess
Expand Down
3 changes: 3 additions & 0 deletions tests/test_bigcode_eval.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import unittest
Expand Down
3 changes: 3 additions & 0 deletions tests/test_lm_eval.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

#

import unittest
Expand Down

0 comments on commit 5c15487

Please sign in to comment.