@@ -524,7 +524,7 @@ def feedback_win(fb_data, llm_data=None):
524
524
525
525
526
526
def sota_win (sota_exp , trace ):
527
- st .header ("SOTA Experiment" , divider = "rainbow" , anchor = "sota-exp" )
527
+ st .subheader ("SOTA Experiment" , divider = "rainbow" , anchor = "sota-exp" )
528
528
if hasattr (trace , "sota_exp_to_submit" ) and trace .sota_exp_to_submit is not None :
529
529
st .markdown (":orange[trace.**sota_exp_to_submit**]" )
530
530
sota_exp = trace .sota_exp_to_submit
@@ -572,6 +572,9 @@ def main_win(loop_id, llm_data=None):
572
572
if "feedback" in loop_data :
573
573
feedback_win (loop_data ["feedback" ], llm_data .get ("feedback" , None ) if llm_data else None )
574
574
if "record" in loop_data and "SOTA experiment" in loop_data ["record" ]:
575
+ st .header ("Record" , divider = "violet" , anchor = "record" )
576
+ if state .show_llm_log and llm_data is not None and "record" in llm_data :
577
+ llm_log_win (llm_data ["record" ]["no_tag" ])
575
578
sota_win (loop_data ["record" ]["SOTA experiment" ], loop_data ["record" ]["trace" ])
576
579
577
580
@@ -707,11 +710,12 @@ def summarize_win():
707
710
parents = final_trace .get_parents (node )
708
711
root_nodes [node ] = parents [0 ]
709
712
parent_nodes [node ] = parents [- 2 ] if len (parents ) > 1 else None
710
- root_nodes = {final_trace .idx2loop_id [n ]: final_trace .idx2loop_id [r ] for n , r in root_nodes .items ()}
711
- parent_nodes = {
712
- final_trace .idx2loop_id [n ]: final_trace .idx2loop_id [r ] if r is not None else r
713
- for n , r in parent_nodes .items ()
714
- }
713
+ if hasattr (final_trace , "idx2loop_id" ):
714
+ root_nodes = {final_trace .idx2loop_id [n ]: final_trace .idx2loop_id [r ] for n , r in root_nodes .items ()}
715
+ parent_nodes = {
716
+ final_trace .idx2loop_id [n ]: final_trace .idx2loop_id [r ] if r is not None else r
717
+ for n , r in parent_nodes .items ()
718
+ }
715
719
716
720
# Generate Summary Table
717
721
df = pd .DataFrame (
@@ -748,7 +752,7 @@ def summarize_win():
748
752
df .at [loop , "Others" ] = {
749
753
k : v
750
754
for k , v in loop_data ["direct_exp_gen" ]["no_tag" ].hypothesis .__dict__ .items ()
751
- if k not in ["component" , "hypothesis" , "reason" ]
755
+ if k not in ["component" , "hypothesis" , "reason" ] and v is not None
752
756
}
753
757
df .loc [loop , "COST($)" ] = sum (tc .content ["cost" ] for tc in state .token_costs [loop ])
754
758
@@ -872,7 +876,7 @@ def summarize_win():
872
876
df .loc [loop , "Feedback" ] = "N/A"
873
877
874
878
if only_success :
875
- df = df [df ["Feedback" ] == "✅" ]
879
+ df = df [df ["Feedback" ]. str . contains ( "✅" , na = False ) ]
876
880
877
881
# Add color styling based on root_nodes
878
882
def style_dataframe_by_root (df , root_nodes ):
@@ -935,13 +939,28 @@ def apply_color(row):
935
939
st .plotly_chart (curve_figure (vscores ))
936
940
937
941
st .markdown ("### Hypotheses Table" )
942
+ hypotheses_df = df .iloc [:, :8 ].copy ()
943
+ others_expanded = pd .json_normalize (hypotheses_df ["Others" ].fillna ({}))
944
+
945
+ hypotheses_df = hypotheses_df .drop ("Others" , axis = 1 )
946
+ hypotheses_df = hypotheses_df .drop ("Parent N" , axis = 1 )
947
+ hypotheses_df = pd .concat ([hypotheses_df .iloc [:, :4 ], others_expanded , hypotheses_df .iloc [:, 4 :]], axis = 1 )
948
+
949
+ styled_hypotheses_table = style_dataframe_by_root (hypotheses_df , root_nodes )
938
950
st .dataframe (
939
- df . iloc [:, : 8 ] ,
951
+ styled_hypotheses_table ,
940
952
row_height = 100 ,
941
953
column_config = {
942
- "Others" : st .column_config .JsonColumn (width = "medium" ),
943
- "Reason" : st .column_config .TextColumn (width = "medium" ),
944
- "Hypothesis" : st .column_config .TextColumn (width = "large" ),
954
+ k : st .column_config .TextColumn (
955
+ k ,
956
+ width = (
957
+ "small"
958
+ if k
959
+ in ["Component" , "Root N" , "Parent N" , "Run Score (valid)" , "Run Score (test)" , "problem_label" ]
960
+ else "medium"
961
+ ),
962
+ )
963
+ for k in hypotheses_df .columns
945
964
},
946
965
)
947
966
@@ -1119,7 +1138,8 @@ def get_folders_sorted(log_path, sort_by_time=False):
1119
1138
- [Coding](#coding)
1120
1139
- [Running](#running)
1121
1140
- [Feedback](#feedback)
1122
- - [SOTA Experiment](#sota-exp)
1141
+ - [Record](#record)
1142
+ - [SOTA Experiment](#sota-exp)
1123
1143
"""
1124
1144
)
1125
1145
0 commit comments