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

Cannot load pickle file #1172

Open
whitphx opened this issue Oct 17, 2024 Discussed in #551 · 0 comments
Open

Cannot load pickle file #1172

whitphx opened this issue Oct 17, 2024 Discussed in #551 · 0 comments

Comments

@whitphx
Copy link
Owner

whitphx commented Oct 17, 2024

Discussed in #551

Originally posted by Halfar0068 April 17, 2023
Hi,

Great work on this project. I am trying to create a desktop app which loads a model created by the FLAML library (saved as a pickle file) and make prediction by this model. When I try to load the model (pickle.load(open('model.pkl', 'rb'))) I get the following error:

ImportError: Could not load dynamic lib: /lib/python3.10/site-packages/scipy/linalg/_fblas.cpython-310-wasm32-emscripten.so Error: bad export type for ztrsm_: undefined

Traceback:
File "/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 564, in _run_script
exec(code, module.dict)
File "/home/pyodide/streamlit_app.py", line 538, in
hp_model = pickle.load(open('model.pkl', 'rb'))
File "/lib/python3.10/site-packages/flaml/init.py", line 2, in
from flaml.automl import AutoML, logger_formatter
File "/lib/python3.10/site-packages/flaml/automl/init.py", line 1, in
from flaml.automl.automl import AutoML, size
File "/lib/python3.10/site-packages/flaml/automl/automl.py", line 12, in
from sklearn.base import BaseEstimator
File "/lib/python3.10/site-packages/sklearn/init.py", line 82, in
from .base import clone
File "/lib/python3.10/site-packages/sklearn/base.py", line 17, in
from .utils import _IS_32BIT
File "/lib/python3.10/site-packages/sklearn/utils/init.py", line 17, in
from scipy.sparse import issparse
File "/lib/python3.10/site-packages/scipy/sparse/init.py", line 283, in
from . import csgraph
File "/lib/python3.10/site-packages/scipy/sparse/csgraph/init.py", line 182, in
from ._laplacian import laplacian
File "/lib/python3.10/site-packages/scipy/sparse/csgraph/_laplacian.py", line 7, in
from scipy.sparse.linalg import LinearOperator
File "/lib/python3.10/site-packages/scipy/sparse/linalg/init.py", line 120, in
from ._isolve import *
File "/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/init.py", line 6, in
from .lgmres import lgmres
File "/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lgmres.py", line 7, in
from scipy.linalg import get_blas_funcs
File "/lib/python3.10/site-packages/scipy/linalg/init.py", line 197, in
from ._misc import *
File "/lib/python3.10/site-packages/scipy/linalg/_misc.py", line 3, in
from .blas import get_blas_funcs
File "/lib/python3.10/site-packages/scipy/linalg/blas.py", line 213, in
from scipy.linalg import _fblas

Do you know how to solve it and load the model?

Thank you for your answers.

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

1 participant