auto-sklearn: Segmentation fault
when try the sample code:
import autosklearn.classification
import sklearn.model_selection
import sklearn.datasets
import sklearn.metrics
X, y = sklearn.datasets.load_digits(return_X_y=True)
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(X, y, random_state=1)
automl = autosklearn.classification.AutoSklearnClassifier()
automl.fit(X_train, y_train)
y_hat = automl.predict(X_test)
print("Accuracy score", sklearn.metrics.accuracy_score(y_test, y_hat))
something wrong with the automl.fit line, and got “Segmentation fault”, the python command console exit.
>automl.fit(X_train, y_train)
/home/work/.pyenv/versions/py3_env/lib/python3.6/site-packages/autosklearn/evaluation/train_evaluator.py:197: RuntimeWarning: Mean of empty slice
Y_train_pred = np.nanmean(Y_train_pred_full, axis=0)
[WARNING] [2019-05-29 16:26:32,672:EnsembleBuilder(1):d74860caaa557f473ce23908ff7ba369] No models better than random - using Dummy Score!
[WARNING] [2019-05-29 16:26:32,680:EnsembleBuilder(1):d74860caaa557f473ce23908ff7ba369] No models better than random - using Dummy Score!
Segmentation fault
(py3_env) [work@*** ~]$ [WARNING] [2019-05-29 16:26:34,685:EnsembleBuilder(1):d74860caaa557f473ce23908ff7ba369] No models better than random - using Dummy Score!
[WARNING] [2019-05-29 16:26:36,689:EnsembleBuilder(1):d74860caaa557f473ce23908ff7ba369] No models better than random - using Dummy Score!
does anyone come across this problem?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 28 (9 by maintainers)
I also encounter this problem, and unfortunately, the above solution seems doesn’t work for me.
Had the same issues on archlinux, been up- an downgrading pyrfr, swig, etc. whatsoever without success. Finally a working procedure as a combination of the above answers (not sure if first pacman/ln step is required):
It seems to work, thx~
os info:
python version:
installation: a)make compile and install swig-4.0.0.tar.gz b)pip install auto-sklearn
pip list:
test.py:
nohup python test.py & nohup file cotennt:
Thanks for letting us know. I just added a push to dockerhub to our docker building github action as docker hub is used more often.
@mfeurer I also have the “Segmentation fault” problem , and it remains unfixed after I install the newest anaconda3 and downgrade the version of swig to 3.0.12.
Thank you very reporting a solution to this issue.
Could you please do me a favor and check the swig version installed with conda? I suspect that this is an issue of the recent SWIG4.