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

Pickled models in installation sometimes break #46

Closed
jacopok opened this issue Oct 27, 2022 · 1 comment
Closed

Pickled models in installation sometimes break #46

jacopok opened this issue Oct 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jacopok
Copy link
Owner

jacopok commented Oct 27, 2022

Traceback is:

Traceback (most recent call last):
  File "/home/jacopo/Documents/masters/mlgw_bns_paper/fig/benchmarking_evaluation.py", line 54, in <module>
    class Approximant(ABC):
  File "/home/jacopo/Documents/masters/mlgw_bns_paper/fig/benchmarking_evaluation.py", line 55, in Approximant
    model = mlgw_bns.Model.default(filename='figure')
  File "/home/jacopo/.pyenv/versions/scripting-env/lib/python3.9/site-packages/mlgw_bns/model.py", line 332, in default
    model.load(streams=(stream_meta, stream_arrays, stream_nn))
  File "/home/jacopo/.pyenv/versions/scripting-env/lib/python3.9/site-packages/mlgw_bns/model.py", line 585, in load
    self.nn = self.nn_kind.from_file(filename_nn)
  File "/home/jacopo/.pyenv/versions/scripting-env/lib/python3.9/site-packages/mlgw_bns/neural_network.py", line 276, in from_file
    return cls(*joblib.load(filename))
  File "/home/jacopo/.pyenv/versions/scripting-env/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in load
    obj = _unpickle(fobj)
  File "/home/jacopo/.pyenv/versions/scripting-env/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
    obj = unpickler.load()
  File "/home/jacopo/.pyenv/versions/3.9.11/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
KeyError: 25

Not sure why: the pickled model is there.

In case this is an issue of interaction with another package, here they are:

$ pip freeze
alembic==1.8.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arviz==0.12.1
astropy==5.1
asttokens==2.0.5
attrs==21.4.0
autopage==0.5.1
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==5.0.1
certifi==2022.6.15
cffi==1.15.0
cftime==1.6.0
charset-normalizer==2.0.12
cliff==3.10.1
cmaes==0.8.2
cmd2==2.4.1
colorlog==6.6.0
corner==2.2.1
cryptography==37.0.2
cycler==0.11.0
Cython==0.29.30
dacite==1.6.0
debugpy==1.6.2
decorator==5.1.1
defusedxml==0.7.1
entrypoints==0.4
exceptiongroup==1.0.0rc9
executing==0.8.3
fastjsonschema==2.16.1
fonttools==4.33.3
greenlet==1.1.2
gwdatafind==1.1.1
h5py==3.7.0
hypothesis==6.56.3
idna==3.3
igwn-auth-utils==0.2.2
iniconfig==1.1.1
ipykernel==6.15.1
ipython==8.4.0
ipython-genutils==0.2.0
ipywidgets==7.7.1
jedi==0.18.1
Jinja2==3.1.2
joblib==1.1.0
jsonschema==4.7.2
jupyter==1.0.0
jupyter-client==7.3.4
jupyter-console==6.4.4
jupyter-core==4.11.1
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.1
kiwisolver==1.4.2
lalsuite==7.5
ligo-segments==1.4.0
llvmlite==0.39.1
lscsoft-glue==3.0.1
Mako==1.2.0
MarkupSafe==2.1.1
matplotlib==3.5.2
matplotlib-inline==0.1.3
mistune==0.8.4
mlgw-bns==0.12.0
mpld3==0.5.8
nbclient==0.6.6
nbconvert==6.5.0
nbformat==5.4.0
nest-asyncio==1.5.5
netCDF4==1.5.8
notebook==6.4.12
numba==0.56.2
numpy==1.23.3
optuna==2.10.1
packaging==21.3
pandas==1.4.2
pandocfilters==1.5.0
parso==0.8.3
pbr==5.9.0
pegasus-wms.api==5.0.1
pegasus-wms.common==5.0.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.1.1
plotly==5.8.2
pluggy==1.0.0
prettytable==3.3.0
prometheus-client==0.14.1
prompt-toolkit==3.0.29
psutil==5.9.1
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0
PyCBC==2.0.2
pycparser==2.21
pyerfa==2.0.0.1
Pygments==2.12.0
PyJWT==2.4.0
pyOpenSSL==22.0.0
pyparsing==3.0.9
pyperclip==1.8.2
pyrsistent==0.18.1
pyRXP==3.0.1
pytest==7.1.3
python-dateutil==2.8.2
python-ligo-lw==1.8.0
pytz==2022.1
PyYAML==6.0
pyzmq==23.2.0
qtconsole==5.3.1
QtPy==2.1.0
requests==2.28.0
safe-netrc==1.0.0
scikit-learn==1.1.2
scipy==1.8.1
scitokens==1.7.0
Send2Trash==1.8.0
six==1.16.0
snakeviz==2.1.1
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.37
stack-data==0.2.0
stevedore==3.5.0
tenacity==8.0.1
teobresums==0.0.2
terminado==0.15.0
threadpoolctl==3.1.0
tinycss2==1.1.1
toml==0.10.2
tomli==2.0.1
tornado==6.1
tqdm==4.64.0
traitlets==5.2.2.post1
types-PyYAML==6.0.11
types-setuptools==57.4.17
typing_extensions==4.2.0
urllib3==1.26.9
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.6.1
xarray==2022.3.0
xarray-einstats==0.2.2
@jacopok jacopok added the bug Something isn't working label Oct 27, 2022
@jacopok
Copy link
Owner Author

jacopok commented Nov 1, 2022

Joblib was the wrong version! have to fix it to version 1.2.0

@jacopok jacopok closed this as completed in 91dca56 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant