Skip to content

Commit 8c8070b

Browse files
committed
test script and modify feature
1 parent 956ad33 commit 8c8070b

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

graph_net/analysis_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,6 @@ def get_incorrect_models(tolerance, log_file_path) -> list:
638638
datalist = parse_logs_to_data(log_file_path)
639639
for i in datalist:
640640
iscorrect, err = check_sample_correctness(i, tolerance)
641-
if not iscorrect and err == "accuracy":
641+
if not iscorrect:
642642
failed_models.append(i.get("model_path"))
643643
return failed_models
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
4+
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
5+
GRAPH_NET_DIR=$(dirname "$SCRIPT_DIR")
6+
PROJECT_ROOT=$(dirname "$GRAPH_NET_DIR")
7+
8+
# 将项目根目录加入Python路径
9+
export PYTHONPATH="$PROJECT_ROOT:$PYTHONPATH"
10+
11+
TOLERANCE_LIST=(-2 -1 0 1 2)
12+
LOG_FILE_PATH="/work/.BCloud/log_20251013_175058_torch_inductor_full.log"
13+
14+
python3 - <<END
15+
from graph_net import analysis_util
16+
17+
result = list(analysis_util.get_incorrect_models($TOLERANCE_LIST, '$LOG_FILE_PATH'))
18+
19+
for item in result:
20+
print(item)
21+
END

graph_net/test/naive_graph_decomposer_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
34
GRAPH_NET_ROOT=$(python3 -c "import graph_net; import os; print(
45
os.path.dirname(graph_net.__file__))")
56

0 commit comments

Comments
 (0)