You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the application is deployed for the first time or the started after the database is cleared, the feature to load the data and train a model is breaking as the data frame loaded is an empty one and getting Xy for the model training fails with the error.
Traceback (most recent call last):
File "app.py", line 24, in <module>
from src.api import metrics_api
File "/home/blake/code/fm-learn/src/api.py", line 22, in <module>
fml.load_data()
File "/home/blake/code/fm-learn/src/fmlearn.py", line 60, in load_data
self._X, self._y = utils.get_Xy(self._df)
File "/home/blake/code/fm-learn/src/utils/utils.py", line 60, in get_Xy
y = df[[DATASET_HASH]]
File "/home/blake/code/fm-learn/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 2806, in __getitem__
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "/home/blake/code/fm-learn/venv/lib/python3.7/site-packages/pandas/core/indexing.py", line 1553, in _get_listlike_indexer
keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
File "/home/blake/code/fm-learn/venv/lib/python3.7/site-packages/pandas/core/indexing.py", line 1640, in _validate_read_indexer
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['Dataset Hash'], dtype='object')] are in the [columns]"
Possible Fix:
Stop training the model if the data frame is empty? and train later once data is available.
Heroku Deployment Failed: reason - empty database.
when the application is deployed for the first time or the started after the database is cleared, the feature to load the data and train a model is breaking as the data frame loaded is an empty one and getting Xy for the model training fails with the error.
Possible Fix:
Stop training the model if the data frame is empty? and train later once data is available.
Other Issues to be considered:
The text was updated successfully, but these errors were encountered: