Skip to content

Commit 4c9461a

Browse files
committed
lint check
1 parent 496515a commit 4c9461a

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

.github/ci_expected_accuracy/check_expected.py

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def parse_file_name(filename):
6666
def load_known_data(issue_file):
6767
"""Load known test data from JSON file."""
6868
try:
69-
with open(issue_file, 'r', encoding='utf-8') as file:
69+
with open(issue_file, encoding='utf-8') as file:
7070
return json.load(file)
7171
except (FileNotFoundError, json.JSONDecodeError) as e:
7272
print(f"Error loading known data from {issue_file}: {e}")
@@ -91,8 +91,7 @@ def update_reference_dataframe(refer_data, model_name, dtype, accuracy):
9191
refer_data.loc[mask, dtype] = accuracy
9292
else:
9393
new_row = {'name': model_name, dtype: accuracy}
94-
refer_data = pd.concat([refer_data, pd.DataFrame([new_row])],
95-
ignore_index=True)
94+
refer_data = pd.concat([refer_data, pd.DataFrame([new_row])], ignore_index=True)
9695
return refer_data
9796

9897

@@ -155,22 +154,14 @@ def main():
155154
description="Accuracy Check",
156155
formatter_class=argparse.ArgumentDefaultsHelpFormatter
157156
)
158-
parser.add_argument("--driver", type=str, default="rolling",
159-
help="rolling or lts")
160-
parser.add_argument("--category", type=str, default="inductor",
161-
help="inductor")
162-
parser.add_argument("--suite", type=str, required=True,
163-
help="huggingface, timm_models or torchbench")
164-
parser.add_argument("--mode", type=str, required=True,
165-
help="inference or training")
166-
parser.add_argument("--dtype", type=str, required=True,
167-
help="float32, bfloat16, float16, amp_bf16 or amp_fp16")
168-
parser.add_argument("--csv_file", type=str, required=True,
169-
help="Test results CSV file path")
170-
parser.add_argument("--issue_file", type=str, required=True,
171-
help="Known test data JSON file path")
172-
parser.add_argument('--update', action='store_true',
173-
help="Whether to update new pass and new failed info")
157+
parser.add_argument("--driver", type=str, default="rolling", help="rolling or lts")
158+
parser.add_argument("--category", type=str, default="inductor", help="inductor")
159+
parser.add_argument("--suite", type=str, required=True, help="huggingface, timm_models or torchbench")
160+
parser.add_argument("--mode", type=str, required=True, help="inference or training")
161+
parser.add_argument("--dtype", type=str, required=True, help="float32, bfloat16, float16, amp_bf16 or amp_fp16")
162+
parser.add_argument("--csv_file", type=str, required=True, help="Test results CSV file path")
163+
parser.add_argument("--issue_file", type=str, required=True, help="Known test data JSON file path")
164+
parser.add_argument('--update', action='store_true', help="Whether to update new pass and new failed info")
174165

175166
args = parser.parse_args()
176167

.github/scripts/e2e_summary.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ set -euo pipefail
55
# Script: test_results_processor.sh
66
# Description: Process accuracy and performance test results for XPU operations
77

8-
readonly script_path="$(dirname "${BASH_SOURCE[0]}")"
9-
readonly SCRIPT_DIR="$(cd "$script_path" && pwd)"
10-
readonly SCRIPT_NAME="$(basename "$0")"
8+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9+
readonly SCRIPT_DIR
10+
SCRIPT_NAME="$(basename "$0")"
11+
readonly SCRIPT_NAME
1112

1213
# Constants
1314
readonly RED='🔴'

.github/scripts/lintrunner.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
set -ex
33

44
# Creat a venv for lint check
5-
curl -LsSf https://astral.sh/uv/install.sh | sh
6-
source $HOME/.local/bin/env
5+
if ! uv --help > /dev/null 2>&1; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
export PATH="$PATH:$HOME/.local/bin"
8+
fi
79
uv venv lint --python 3.12 --clear
810
source lint/bin/activate
911
uv pip install -U pip setuptools wheel
@@ -25,7 +27,7 @@ if ! command -v lintrunner &> /dev/null; then
2527
fi
2628

2729
# Ignoring errors in one specific run
28-
export SHELLCHECK_OPTS="-e SC2154 -e SC2086 -e SC1091 -e SC2046 -e SC2076 -e SC2034"
30+
export SHELLCHECK_OPTS="-e SC2154 -e SC2086 -e SC1091 -e SC2046 -e SC2076 -e SC2034 -e SC2190"
2931

3032
# This has already been cached in the docker image
3133
lintrunner init 2> /dev/null

0 commit comments

Comments
 (0)