Skip to content
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

Get rid of C assertions please #91

Open
quantverse opened this issue Jan 30, 2017 · 1 comment
Open

Get rid of C assertions please #91

quantverse opened this issue Jan 30, 2017 · 1 comment

Comments

@quantverse
Copy link

Hello,

this project should just get rid of C assertions completely (they should be replaced by some better, reliable error handling techniques.) I use this library from python and it crashes whole script when assertion fails.

Example: when it does not like something in your data (whatever that is), it just crashes with assertion like this:

python3: 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.

Which crashes the python script completely without any possibility to recover from the error. This should never happen. It should throw an exception instead so the script may recover if it catches the exception. Until then, fastFM cannot be used in any automated complex applications.

@ibayer
Copy link
Owner

ibayer commented Jan 30, 2017

Thank you for your kind words.
A contributions removing the assertions would indeed be very welcome.
A good place to start would be this issue:
#88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants