-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'NoneType' object is not iterable #234
Comments
TPOT no longer uses Pandas dataframes, so that may be part of the issue. However, converting each of X_train, y_train, etc. to numpy matrices with the function Comparing against known working datasets, the difference appears to be that the shape of your |
Granted, the error message should be more explanatory. I'll definitely fix that for the next release. |
@teaearlgraycold oh how interesting, is there a link to some discussion on why Pandas dataframes were dropped out out TPOT? |
Essentially, pandas has a much larger memory footprint (Edit than numpy matrices). Also, and this was a very recent decision that didn't get much discussion on GitHub, TPOT now does almost no data management, with all data just passed to sklearn pipelines directly. This works by actually exporting each tested pipeline to Python code (using the same code as the |
The error still occurs when the X and Y datasets presented to the fit method are numpy arrays and the shape of the target array is (n,) i.e. one dimensional. I have code and data to replicate it here: |
@earino, I think your issue could be fixed if you replaced the lines: X_train = train.ix[:, df.columns != "class"].as_matrix()
y_train = train["class"].as_matrix()
X_test = test.ix[:, df.columns != "class"].as_matrix()
y_test = test["class"].as_matrix() with X_train = train.ix[:, df.columns != "class"].values
y_train = train["class"].values
X_test = test.ix[:, df.columns != "class"].values
y_test = test["class"].values Please let me know how that works for you. |
Does this issue seem to be solved now, per your comments in #235? |
The issue is solved, in that if I send data to it in the proper format, it behaves correctly :) |
In attempting to use the newly released tpot 0.5.0 I get an error when attempting to fit a pipeline.
Context of the issue
This was a working example before the release of tpot 0.5.0, and after the upgrade, I am getting errors. The reproducible example is available here:
https://app.dominodatalab.com/u/earino/tpot_reprex/runs/57bb7b8180f4fe61775a16c2
Process to reproduce the issue
The script which crashes is here:
https://app.dominodatalab.com/u/earino/tpot_reprex/view/example.py
The code can be executed by simply clicking "run" on the example.py screen above ^
Expected result
I would have expected a generated pipeline
Current result
I am getting the error:
Possible fix
Unknown
Environment Information
You can look at the log of the run in the above link, however to make life easier, I am copy/pasting the build process which contains package versions:
The text was updated successfully, but these errors were encountered: