mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
@@ -202,4 +202,7 @@ with st.container(border=True):
|
||||
try:
|
||||
all_summarize_win()
|
||||
except Exception as e:
|
||||
import traceback
|
||||
|
||||
st.error(f"Error occurred when show summary:\n{e}")
|
||||
st.code(traceback.format_exc())
|
||||
|
||||
@@ -263,7 +263,7 @@ def _get_score_stat_hash_func(log_path: Path, sota_loop_id: int) -> str:
|
||||
return _log_path_hash_func(log_path) + str(sota_loop_id)
|
||||
|
||||
|
||||
def get_score_stat(log_path: Path, sota_loop_id: int) -> tuple[float | None, float | None, bool, float | None]:
|
||||
def get_score_stat(log_path: Path, sota_loop_id: int) -> tuple[float | None, float | None, bool | None, float | None]:
|
||||
"""
|
||||
Get the scores before and after merge period.
|
||||
|
||||
@@ -298,8 +298,10 @@ def get_score_stat(log_path: Path, sota_loop_id: int) -> tuple[float | None, flo
|
||||
total_merge_loops = 0
|
||||
log_storage = FileStorage(log_path)
|
||||
all_trace = list(log_storage.iter_msg(tag="trace"))
|
||||
final_trace = all_trace[-1].content
|
||||
|
||||
if all_trace:
|
||||
final_trace = all_trace[-1].content
|
||||
else:
|
||||
return None, None, None, None
|
||||
for loop_index, (exp, fb) in enumerate(final_trace.hist):
|
||||
if hasattr(final_trace, "idx2loop_id"):
|
||||
loop_id = final_trace.idx2loop_id[loop_index]
|
||||
|
||||
Reference in New Issue
Block a user