Spaces:
Runtime error
Runtime error
jamesnzeex
commited on
Commit
•
acd390c
1
Parent(s):
51c534f
update model save logic
Browse files
utils.py
CHANGED
@@ -227,7 +227,7 @@ def get_update(data_year):
|
|
227 |
model_score = float(data.split()[-1])
|
228 |
MSE = np.sqrt(mean_squared_error(y_test, model_RFR.predict(X_test)))
|
229 |
|
230 |
-
if
|
231 |
pickle.dump(model_RFR, open('model.sav', 'wb'))
|
232 |
f = open("model.log", "w")
|
233 |
f.write(f'model_score = {MSE}')
|
|
|
227 |
model_score = float(data.split()[-1])
|
228 |
MSE = np.sqrt(mean_squared_error(y_test, model_RFR.predict(X_test)))
|
229 |
|
230 |
+
if MSE < model_score:
|
231 |
pickle.dump(model_RFR, open('model.sav', 'wb'))
|
232 |
f = open("model.log", "w")
|
233 |
f.write(f'model_score = {MSE}')
|