Corey Morris commited on
Commit
5603e9f
1 Parent(s): e79bcf3

fixed test_streamlit_app_runs

Browse files
Files changed (1) hide show
  1. test_integration.py +6 -2
test_integration.py CHANGED
@@ -3,6 +3,7 @@ import time
3
  import requests
4
  import unittest
5
  from app import find_top_differences_table
 
6
 
7
  class TestAppFunctions(unittest.TestCase):
8
 
@@ -16,17 +17,20 @@ class TestAppFunctions(unittest.TestCase):
16
  filtered_data = self.data
17
 
18
  # Get the closest 5 models with unique indices
 
 
19
  closest_models_diffs = filtered_data['MMLU_average'].sub(filtered_data.loc[selected_model_name, 'MMLU_average']).abs()
20
  closest_models = closest_models_diffs.nsmallest(5, keep='first').index.drop_duplicates().tolist()
21
 
22
 
23
- exclude_columns=['Parameters']
 
24
  # Run the problematic function without catching the TypeError
25
  top_differences_table, top_differences_tasks = find_top_differences_table(
26
  self.data, selected_model_name, closest_models, exclude_columns
27
  )
28
 
29
- def test_streamlit_app_runs():
30
  # Start the Streamlit app in a subprocess
31
  process = subprocess.Popen(["streamlit", "run", "app.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
32
 
 
3
  import requests
4
  import unittest
5
  from app import find_top_differences_table
6
+ from result_data_processor import ResultDataProcessor
7
 
8
  class TestAppFunctions(unittest.TestCase):
9
 
 
17
  filtered_data = self.data
18
 
19
  # Get the closest 5 models with unique indices
20
+ selected_model_name = 'Platypus2-70B-instruct'
21
+ exclude_columns=['Parameters','organization']
22
  closest_models_diffs = filtered_data['MMLU_average'].sub(filtered_data.loc[selected_model_name, 'MMLU_average']).abs()
23
  closest_models = closest_models_diffs.nsmallest(5, keep='first').index.drop_duplicates().tolist()
24
 
25
 
26
+
27
+
28
  # Run the problematic function without catching the TypeError
29
  top_differences_table, top_differences_tasks = find_top_differences_table(
30
  self.data, selected_model_name, closest_models, exclude_columns
31
  )
32
 
33
+ def test_streamlit_app_runs(self):
34
  # Start the Streamlit app in a subprocess
35
  process = subprocess.Popen(["streamlit", "run", "app.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
36