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
I was using the possum data set and selected 'belly' as the feature, leaving everything else as default values. I did NOT select any features to drop (note that features contain a mix of categorical and numerical data). On the last step (generating the code), application crashed with the following stack trace:
[2023-04-27 10:50:45,680] ERROR in app: Exception on /train [GET]
Traceback (most recent call last):
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/Users/holdenerea/repos/ml_code_generator/flask_app/api/views.py", line 125, in train_lin_reg
generator.train_lin_reg()
File "/Users/holdenerea/repos/ml_code_generator/application/code_generator.py", line 64, in train_lin_reg
model = self._parse_and_execute('train_lin_reg', ['x_train', 'y_train'])
File "/Users/holdenerea/repos/ml_code_generator/application/code_generator.py", line 117, in _parse_and_execute
output = self.function_mapping[template](replaced_args) # where the code is executed
File "/Users/holdenerea/repos/ml_code_generator/pandas_code/code_templates/train_lin_reg.py", line 4, in get_code
model = LinearRegression().fit(args[0], args[1])
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/sklearn/linear_model/_base.py", line 684, in fit
X, y = self._validate_data(
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/sklearn/base.py", line 596, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/sklearn/utils/validation.py", line 1074, in check_X_y
X = check_array(
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/sklearn/utils/validation.py", line 856, in check_array
array = np.asarray(array, order=order, dtype=dtype)
File "/Users/holdenerea/repos/ml_code_generator/venv/lib/python3.9/site-packages/pandas/core/generic.py", line 2072, in __array__
return np.asarray(self._values, dtype=dtype)
ValueError: could not convert string to float: 'other'
127.0.0.1 - - [27/Apr/2023 10:50:45] "GET /train HTTP/1.1" 500 -
The text was updated successfully, but these errors were encountered:
I was using the possum data set and selected 'belly' as the feature, leaving everything else as default values. I did NOT select any features to drop (note that features contain a mix of categorical and numerical data). On the last step (generating the code), application crashed with the following stack trace:
The text was updated successfully, but these errors were encountered: