piotr-szleg-bards-ai commited on
Commit
d18a238
·
1 Parent(s): 96a59f8

2024-02-08 00:37:24 Publish script update

Browse files
app.py CHANGED
@@ -35,7 +35,7 @@ When it comes to pricing most providers charge per token count, while HuggingFac
35
  """
36
 
37
  time_periods_explanation_df = pd.DataFrame({
38
- 'name': ["early morning", "morning", "afternoon", "late afternoon", "evening", "late evening", "midnight", "night"],
39
  'hour_range': ["6-8", "9-11", "12-14", "15-17", "18-20", "21-23", "0-2", "3-5"]
40
  })
41
 
@@ -50,12 +50,7 @@ summary_df: pd.DataFrame = pd.read_csv("data/2024-02-05 23:33:22.947120_summary.
50
  time_of_day_comparison_df = pd.read_csv("data/2024-02-06 09:49:19.637072_time_of_day_comparison.csv")
51
  general_plots = pd.read_csv("data/2024-02-06 15:35:24.490454_general_plot.csv")
52
  model_costs_df = pd.read_csv("data/2024-02-05 12:03:45.281624_model_costs.csv")
53
-
54
-
55
- with open("data/time_of_day_plot.json", "r") as f:
56
- time_of_day_plot = plotly.io.from_json(f.read())
57
- time_of_day_plot.update_layout(autosize=True)
58
-
59
 
60
  searched_model_name = ""
61
  collapse_languages = False
@@ -174,9 +169,13 @@ To count words we split the output string by whitespace `\w` regex character.
174
  Chunk sizes are measured in the characters count.""")
175
 
176
  with gr.Tab("Preformance by time of the day"):
177
- time_of_day_comparison_ui = gr.DataFrame(dataframe_style(time_of_day_comparison_df), label="Time of day")
178
- time_of_day_plot_ui = gr.Plot(time_of_day_plot, label="Time of the day plot", scale=1)
 
 
 
179
  time_periods_explanation_ui = gr.DataFrame(dataframe_style(time_periods_explanation_df), label="Times of day ranges")
 
180
  gr.Markdown("""\
181
  These measurements were made by testing the models using the same dataset as in the other comparisons every hour for 24 hours.
182
 
@@ -186,6 +185,11 @@ Hours and times of day in the table and in the plot are based on Central Europea
186
 
187
  Measurements were made during a normal work week.
188
  """)
 
 
 
 
 
189
 
190
  with gr.Tab("Costs comparison"):
191
  models_costs_ui = gr.DataFrame(dataframe_style(model_costs_df), label="Costs comparison")
 
35
  """
36
 
37
  time_periods_explanation_df = pd.DataFrame({
38
+ 'time_of_day': ["early morning", "morning", "afternoon", "late afternoon", "evening", "late evening", "midnight", "night"],
39
  'hour_range': ["6-8", "9-11", "12-14", "15-17", "18-20", "21-23", "0-2", "3-5"]
40
  })
41
 
 
50
  time_of_day_comparison_df = pd.read_csv("data/2024-02-06 09:49:19.637072_time_of_day_comparison.csv")
51
  general_plots = pd.read_csv("data/2024-02-06 15:35:24.490454_general_plot.csv")
52
  model_costs_df = pd.read_csv("data/2024-02-05 12:03:45.281624_model_costs.csv")
53
+ time_of_day_plots = pd.read_csv("data/time_of_day_plots.csv")
 
 
 
 
 
54
 
55
  searched_model_name = ""
56
  collapse_languages = False
 
169
  Chunk sizes are measured in the characters count.""")
170
 
171
  with gr.Tab("Preformance by time of the day"):
172
+ # display only first plot for all models
173
+ for index, row in time_of_day_plots[0:1].iterrows():
174
+ plot = plotly.io.from_json(row["plot_json"])
175
+ plot.update_layout(autosize=True)
176
+ gr.Plot(plot, label=row["header"], scale=1)
177
  time_periods_explanation_ui = gr.DataFrame(dataframe_style(time_periods_explanation_df), label="Times of day ranges")
178
+ time_of_day_comparison_ui = gr.DataFrame(dataframe_style(time_of_day_comparison_df), label="Time of day")
179
  gr.Markdown("""\
180
  These measurements were made by testing the models using the same dataset as in the other comparisons every hour for 24 hours.
181
 
 
185
 
186
  Measurements were made during a normal work week.
187
  """)
188
+ # display rest of the plots
189
+ for index, row in time_of_day_plots[1:].iterrows():
190
+ plot = plotly.io.from_json(row["plot_json"])
191
+ plot.update_layout(autosize=True)
192
+ gr.Plot(plot, label=row["header"], scale=1)
193
 
194
  with gr.Tab("Costs comparison"):
195
  models_costs_ui = gr.DataFrame(dataframe_style(model_costs_df), label="Costs comparison")
data/2024-02-07 11:34:10.200271_general_plot.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/2024-02-07 17:26:58.596648_time_of_day_plots.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/time_of_day_plots.csv ADDED
The diff for this file is too large to render. See raw diff
 
pipeline/config.py CHANGED
@@ -33,9 +33,10 @@ class QueriesConfig(Config):
33
  }
34
 
35
 
36
- class OpenAIConfig(Config):
37
  mock: bool = False
38
  remove_old_measurements: bool = False
 
39
 
40
 
41
  class QueriesDatasetConfig(Config):
 
33
  }
34
 
35
 
36
+ class MeasurementsConfig(Config):
37
  mock: bool = False
38
  remove_old_measurements: bool = False
39
+ small_dataset: bool = False
40
 
41
 
42
  class QueriesDatasetConfig(Config):