Why are our results for 3.6 and 3.7 consistent but not 3.5?
This issue can possible deal with Dict() in 3.5 having insertion order.
We should write a summary here of what appears to be inconsistent
I can't seem to find another ticket but this issue might also be related/fix CircleCI inconsistency with parallelization in 3.5.
Errors that could pop up can be found here.
Awesome, thanks.
What I see in the logs is that some of our unit tests are failing on python 3.5 but still passing on 3.6 and 3.7.
This issue can possible deal with Dict() in 3.5 having insertion order.
That would make sense.
Next questions/tasks:
I started looking into this.
Summary: able to repro unreliably/occasionally. Still not sure of the root cause.
From sifting through the CircleCI results, it looks like this happens a small percentage of the time. Maybe 10-20%.
Note: I filed #311 to track some warning messages I saw in the unit tests. May be related, unsure.
Stack trace
evalml/tests/automl_tests/test_auto_regression_search.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
evalml/automl/auto_base.py:165: in search
self._do_iteration(X, y, pbar, raise_errors)
evalml/automl/auto_base.py:261: in _do_iteration
raise e
evalml/automl/auto_base.py:258: in _do_iteration
score, other_scores = pipeline.score(X_test, y_test, other_objectives=self.additional_objectives)
evalml/pipelines/pipeline_base.py:257: in score
y_predicted = self.predict(X)
evalml/pipelines/pipeline_base.py:205: in predict
return self.estimator.predict(X_t)
evalml/pipelines/components/estimators/estimator.py:17: in predict
return self._component_obj.predict(X)
test_python/lib/python3.5/site-packages/sklearn/ensemble/_forest.py:782: in predict
for e in self.estimators_)
test_python/lib/python3.5/site-packages/joblib/parallel.py:1004: in __call__
if self.dispatch_one_batch(iterator):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
...
> islice = list(itertools.islice(iterator, big_batch_size))
E ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
test_python/lib/python3.5/site-packages/joblib/parallel.py:808: ValueError
Some possibilities
test_python/lib/python3.5/site-packages/sklearn/ensemble/_forest.py:782 (which, if I got the right version, is here). The sklearn version used by CircleCI for py3.5 is 0.22.1.Stuff I tried
I grabbed this failed "linux python 3.5 unit tests" job and used CircleCI's "rerun with SSH" (super handy). Once inside I activated the test_python venv and ran the pytest cmd triggered by make circleci-test
I tried running some of the unit tests which had failed individually, with no luck. It was only when I ran all of them at once that I was able to repro some failures. But the tests which failed changed a bit each time and seemed unpredictable.
Next steps
Not the cause
-n flag on pytest. Perhaps this issue is exposing a bug in the way pytest spins up parallel workers -- wait, never mind, because this test failed before the -n was added by Jeremy on his branchin terms of the necessity to support 3.5...
currently 5-10% of our featuretools downloads come from python 3.5. i also looked at a few other ml-related libraries
scikit-learn: ~10%
pandas: 10-15%
xgboost: 20-30%
numpy: 10%
so, my thought would be that yes, we should try to support it since there are people using it. if maintaining it is a slowing us down drastically, we could revisit that.
checkout whatever package you want here: https://pypistats.org/packages/pandas
Just saw another instance of this failure on my PR, here. It hasn't magically gone away :) we should dig into this soon
We're removing support for python 3.5 in #435.
But note @angela97lin mentioned she's seen this failure on python 3.6 馃挬 Updating issue name to correspond.
RE comment in #435, I wonder if this issue has something to do with our use of OrderedDict... probably not, just adding to the list of possibilities.
@angela97lin do you have any info / links / repro with the 3.6 failure you saw? Was it local or on circleci?
Sure! I've only run into it via my random_state PR for python 3.6, so I've been trying to debug. Here's that PR: #431
From Slack thread:
My guess is that it has to do something with n_jobs=-1 since in the stack trace, we get a ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize. ; it鈥檚 likely that when n_jobs=-1, the stop argument passed in becomes negative and triggers this exception. The error goes away when n_jobs an positive integer.
Here鈥檚 a run where I ran into this: https://app.circleci.com/jobs/github/FeatureLabs/evalml/12366
It seems to only happen on CircleCI, so I wonder if that has to do with the issue at all?
Status
We're able to repro this on python 3.6 on @angela97lin 's PR #441. Circleci failure is here. We can't repro by running individual tests, have to run them all.
We were previously seeing this failure only on python 3.5. Now Angela tweaking the random_state causes this to fail on python 3.6 only. This makes me think there's a race condition which has to do with the ordering of calls to the random number generator. It's quite helpful that it appears to be failing consistently on python 3.6 on Angela's random_state branch.
Next steps
unit_tests circleci config to limit test job to 8 cpus: docker:
- command: ['--cpuset', '0-7']
We should reevaluate if this is still an issue now that @christopherbunn merged #407
I haven't seen this issue since #407 was merged. Closing.