<div dir="ltr">Hi folks.<br><br>I'm new to Scikit-learn.<br><br>I have a very large Python project that seems to have a heisenbug which is manifesting in scikit-learn code.<br><br>Short of constructing an SSCCE, are there any magical techniques I should try for pinning down the precise cause?  Like valgrind or something?<br><br>An SSCCE will most likely be pretty painful: the project has copious shared, mutable state, and I've already tried a largish test program that calls into the same code path with the error manifesting 0 times in 100.<br><br>It's quite possible the root cause will turn out to be some other part of the software stack.<br><br>The traceback from pytest looks like:<br>sequential/test_training.py:101:<br>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br>../rt/classifier/coach.py:146: in train<br>    **self.classifier_section<br>../domain/classifier/factories/classifier_academy.py:115: in create_classifier<br>    **kwargs)<br>../domain/classifier/factories/imp/xgb_factory.py:164: in create<br>    clf_random.fit(X_train, y_train)<br>../../../../.local/lib/python3.6/site-packages/sklearn/model_selection/_search.py:722: in fit<br>    self._run_search(evaluate_candidates)<br>../../../../.local/lib/python3.6/site-packages/sklearn/model_selection/_search.py:1515: in _run_search<br>    random_state=self.random_state))<br>../../../../.local/lib/python3.6/site-packages/sklearn/model_selection/_search.py:711: in evaluate_candidates<br>    cv.split(X, y, groups)))<br>../../../../.local/lib/python3.6/site-packages/sklearn/externals/joblib/parallel.py:996: in __call__<br>    self.retrieve()<br>../../../../.local/lib/python3.6/site-packages/sklearn/externals/joblib/parallel.py:899: in retrieve<br>    self._output.extend(job.get(timeout=self.timeout))<br>../../../../.local/lib/python3.6/site-packages/sklearn/externals/joblib/_parallel_backends.py:517: in wrap_future_result<br>    return future.result(timeout=timeout)<br>/usr/lib/python3.6/concurrent/futures/_base.py:425: in result<br>    return self.__get_result()<br>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br><br>self = <Future at 0x7f15571ec7f0 state=finished raised ValueError><br><br>    def __get_result(self):<br>        if self._exception:<br>>           raise self._exception<br>E           ValueError: Input contains NaN, infinity or a value too large for dtype('float32').<br><br>/usr/lib/python3.6/concurrent/futures/_base.py:384: ValueError<br><br><br>The above exception is raised about 12 to 14 times in 100 in full-blown automated testing.<br><br>Thanks for the cool software.<br></div>