You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@siyuan-chen found an issue in a fresh enterprise install using pip.
scikit-sparse (sks) depends on the SuiteSparse C library. If SuiteSparse isn't installed, sks can still install "successfully", but it will throw errors when used.
In LogLikelihood.__call__() there's a cholesky call inside a try / except that catches all errors. This means that if sks isn't linked to SuiteSparse correctly, the sks error will send the code to the except statement. LogLiklihood will return -inf when it should crash and exit. There's no indication to the user what went wrong.
The install problem can happen because requirements.txt installs sks with the --no-binary option. This assumes the user has an existing install of SuiteSparse. Installing the packaged binary of sks will use a generic BLAS, which is slower than a locally optimized version. If you install packaged binaries of numpy and scipy via pip, they won't used optimized BLAS either.
change the requirements.txt to use the packaged binary version of sks. A pip install is already using generic BLAS for numpy... 🤷
specify which errors that try / except is intended to catch, so the code exits on others. I think we want it to return -inf and continue if Sigma is singular
The text was updated successfully, but these errors were encountered:
This is somewhat related to #257 and #258 and will somewhat be solved by this PR I could possible add a check in here so the install will fail properly if the linked libraries aren't found.
@siyuan-chen found an issue in a fresh
enterprise
install usingpip
.scikit-sparse
(sks) depends on theSuiteSparse
C library. If SuiteSparse isn't installed,sks
can still install "successfully", but it will throw errors when used.In
LogLikelihood.__call__()
there's acholesky
call inside atry
/except
that catches all errors. This means that ifsks
isn't linked to SuiteSparse correctly, thesks
error will send the code to theexcept
statement.LogLiklihood
will return-inf
when it should crash and exit. There's no indication to the user what went wrong.The install problem can happen because
requirements.txt
installssks
with the--no-binary
option. This assumes the user has an existing install of SuiteSparse. Installing the packaged binary ofsks
will use a generic BLAS, which is slower than a locally optimized version. If you install packaged binaries ofnumpy
andscipy
viapip
, they won't used optimized BLAS either.There are few things to do:
sks
linking when we check that it is installed and give a meaningful error messagerequirements.txt
to use the packaged binary version ofsks
. Apip
install is already using generic BLAS fornumpy
... 🤷try
/except
is intended to catch, so the code exits on others. I think we want it to return-inf
and continue ifSigma
is singularThe text was updated successfully, but these errors were encountered: