badaoui HF Staff commited on
Commit
6d8041f
·
1 Parent(s): a52bb7d
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -11,8 +11,6 @@ from model_page import plot_model_stats
11
  from time_series_gradio import (
12
  create_time_series_summary_gradio,
13
  create_model_time_series_gradio,
14
- get_time_series_summary_dfs,
15
- get_model_time_series_dfs,
16
  )
17
 
18
 
@@ -638,11 +636,11 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
638
 
639
  def get_historical_summary_plots():
640
  """Get historical summary plots from preloaded data."""
641
- dfs = get_time_series_summary_dfs(Ci_results.historical_df)
642
  return (
643
- gr.update(value=dfs['failure_rates_df'], visible=True),
644
- gr.update(value=dfs['amd_tests_df'], visible=True),
645
- gr.update(value=dfs['nvidia_tests_df'], visible=True),
646
  )
647
 
648
  def handle_history_toggle(history_mode, last_selected_model, in_model_view):
@@ -753,10 +751,10 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
753
  # Time-series model selection functionality
754
  def show_time_series_model(selected_model):
755
  """Show time-series view for a specific model."""
756
- dfs = get_model_time_series_dfs(Ci_results.historical_df, selected_model)
757
  return (
758
- gr.update(value=dfs['amd_df'], visible=True, title=f"{selected_model.upper()} - AMD Results Over Time"),
759
- gr.update(value=dfs['nvidia_df'], visible=True, title=f"{selected_model.upper()} - NVIDIA Results Over Time"),
760
  )
761
 
762
  # Unified model click handler: respects History toggle
 
11
  from time_series_gradio import (
12
  create_time_series_summary_gradio,
13
  create_model_time_series_gradio,
 
 
14
  )
15
 
16
 
 
636
 
637
  def get_historical_summary_plots():
638
  """Get historical summary plots from preloaded data."""
639
+ plots = create_time_series_summary_gradio(Ci_results.historical_df)
640
  return (
641
+ gr.update(value=plots['failure_rates'], visible=True),
642
+ gr.update(value=plots['amd_tests'], visible=True),
643
+ gr.update(value=plots['nvidia_tests'], visible=True),
644
  )
645
 
646
  def handle_history_toggle(history_mode, last_selected_model, in_model_view):
 
751
  # Time-series model selection functionality
752
  def show_time_series_model(selected_model):
753
  """Show time-series view for a specific model."""
754
+ plots = create_model_time_series_gradio(Ci_results.historical_df, selected_model)
755
  return (
756
+ gr.update(value=plots['amd_plot'], visible=True),
757
+ gr.update(value=plots['nvidia_plot'], visible=True),
758
  )
759
 
760
  # Unified model click handler: respects History toggle