Skip to content

Commit bec301f

Browse files
committed
change error code -> status
1 parent 9557747 commit bec301f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

graph_net/analysis_util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
from graph_net.config.datatype_tolerance_config import get_precision
66

77

8-
def detect_sample_error_code(log_text: str) -> str:
8+
def detect_sample_status(log_text: str) -> str:
99
"""
10-
Detect the error code for a single sample from log text.
10+
Detect the status for a single sample from log text.
1111
12-
This function analyzes log text (can be string or list of lines) and returns an error code.
12+
This function analyzes log text (can be string or list of lines) and returns a status.
1313
It checks for explicit eager phase status and shape/type mismatches.
1414
1515
Args:
1616
log_text: Log text content (can be a string or list of lines)
1717
1818
Returns:
19-
Error code string. Possible values:
19+
Possible values:
2020
- "correct": Sample executed successfully
2121
- "eager_fail": Eager model execution failed
2222
- "compile_fail": Compiled model failed to load
@@ -136,7 +136,7 @@ def parse_single_sample_log_to_data(log_text: str) -> dict:
136136
data["performance"]["speedup"][key.strip()] = float(value_str)
137137
continue
138138

139-
data["status"] = detect_sample_error_code(log_text)
139+
data["status"] = detect_sample_status(log_text)
140140

141141
return data
142142

@@ -287,7 +287,7 @@ def get_correctness(dtype: str, t: int, correctness_data: dict, index: int) -> b
287287

288288
def fake_perf_degrad(tolerance, error_code, type="default") -> str:
289289
"""
290-
Judge current correctness based on tolerance t and error code.
290+
Judge current correctness based on tolerance t and status.
291291
"""
292292
if type == "default":
293293
if tolerance >= 3:

0 commit comments

Comments
 (0)