hassonofer commited on
Commit
b315517
·
1 Parent(s): e77bee6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -40,6 +40,13 @@ def plot_acc_param(param_compare_results_df: pl.DataFrame, width: int = 1000, he
40
 
41
 
42
  def plot_acc_memory(memory_compare_results_df: pl.DataFrame, width: int = 900, height: int = 640) -> alt.LayerChart:
 
 
 
 
 
 
 
43
  df = memory_compare_results_df.select(
44
  "Model name",
45
  "Model type",
@@ -71,7 +78,9 @@ def plot_acc_memory(memory_compare_results_df: pl.DataFrame, width: int = 900, h
71
  )
72
 
73
  chart = base + text + frontier
74
- return chart.properties(title="Accuray vs GPU Memory", width=width, height=height).configure_scale(zero=False)
 
 
75
 
76
 
77
  def plot_acc_rate(rate_compare_results_df: pl.DataFrame, width: int = 1000, height: int = 680) -> alt.LayerChart:
 
40
 
41
 
42
  def plot_acc_memory(memory_compare_results_df: pl.DataFrame, width: int = 900, height: int = 640) -> alt.LayerChart:
43
+ if len(memory_compare_results_df) > 0:
44
+ batch_size = memory_compare_results_df["batch_size"][0]
45
+ amp = memory_compare_results_df["amp"][0]
46
+ else:
47
+ batch_size = ""
48
+ amp = ""
49
+
50
  df = memory_compare_results_df.select(
51
  "Model name",
52
  "Model type",
 
78
  )
79
 
80
  chart = base + text + frontier
81
+ return chart.properties(
82
+ title=f"Accuray vs GPU Memory (batch size={batch_size}, amp={amp}", width=width, height=height
83
+ ).configure_scale(zero=False)
84
 
85
 
86
  def plot_acc_rate(rate_compare_results_df: pl.DataFrame, width: int = 1000, height: int = 680) -> alt.LayerChart: