C assertions causing core dump without any useful message
macks22 opened this issue · 1 comments
macks22 commented
I'm getting the following with 0.2.9 (fresh pip install today):
python: ffm_als_mcmc.c:172: sparse_fit: Assertion `(sizeof (*w_0) == sizeof (float) ? __finitef (*w_0) : sizeof (*w_0) == sizeof (double) ? __finite (*w_0) : __finitel (*w_0)) && "w_0 not finite"' failed.
[1] 30860 abort (core dumped) python classify.py --nsplits 1 -c fm --basic-descriptive --date --subways ...
I'm using the als.FMClassifier via a wrapper class for one-vs-rest classification:
from fastFM import als
class FMClassifier(als.FMClassification):
def fit(self, X, y, *args):
y = y.copy()
y[y == 0] = -1
return super(FMClassifier, self).fit(X, y, *args)
def predict_proba(self, X):
probs = super(FMClassifier, self).predict_proba(X)
return np.tile(probs, 2).reshape(2, probs.shape[0]).T
from sklearn.multiclass import OneVsRestClassifier
return OneVsRestClassifier(
FMClassifier(n_iter=500, random_state=42))
The data I was using to fit the model is attached. I tried to get a smaller dataset, but I was having trouble producing it when I cut things out.
X_train_sparse_fit_issue.npy.zip
y_train_sparse_fit_issue.npy.zip
macks22 commented
Sorry, wrong repo!