MilesCranmer commited on
Commit
09714d6
1 Parent(s): a1c360e

style(gui): ruff lint

Browse files
Files changed (1) hide show
  1. gui/processing.py +10 -8
gui/processing.py CHANGED
@@ -10,13 +10,15 @@ import pandas as pd
10
  from data import generate_data, read_csv
11
  from plots import plot_predictions
12
 
13
- EMPTY_DF = lambda: pd.DataFrame(
14
- {
15
- "Equation": [],
16
- "Loss": [],
17
- "Complexity": [],
18
- }
19
- )
 
 
20
 
21
 
22
  def pysr_fit(queue: mp.Queue, out_queue: mp.Queue):
@@ -138,7 +140,7 @@ def processing(
138
  try:
139
  X, y = read_csv(file_input, force_run)
140
  except ValueError as e:
141
- return (EMPTY_DF(), plot_predictions([], []), str(e))
142
  else:
143
  X, y = generate_data(test_equation, num_points, noise_level, data_seed)
144
 
 
10
  from data import generate_data, read_csv
11
  from plots import plot_predictions
12
 
13
+
14
+ def empty_df():
15
+ return pd.DataFrame(
16
+ {
17
+ "Equation": [],
18
+ "Loss": [],
19
+ "Complexity": [],
20
+ }
21
+ )
22
 
23
 
24
  def pysr_fit(queue: mp.Queue, out_queue: mp.Queue):
 
140
  try:
141
  X, y = read_csv(file_input, force_run)
142
  except ValueError as e:
143
+ return (empty_df(), plot_predictions([], []), str(e))
144
  else:
145
  X, y = generate_data(test_equation, num_points, noise_level, data_seed)
146