The recent update to config.json broke the standard method of loading the model

#5
by JHolmes89 - opened

Attempting to run

SentenceTransformer('pritamdeka/S-PubMedBert-MS-MARCO')

now results in

ValueError: Unrecognized model in pritamdeka/S-PubMedBert-MS-MARCO. Should have a `model_type` key in its config.json
JHolmes89 changed discussion title from The recent update to config.json broke the model to The recent update to config.json broke the standard method of loading the model

Actually, I'm finding it works in one environment and not in another. Very mysterious.

pip freeze of environment where model is broken

anyio==4.2.0
appnope==0.1.3
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.14.0
beautifulsoup4==4.12.2
bleach==6.1.0
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
comm==0.2.1
contourpy==1.2.0
cycler==0.12.1
debugpy==1.8.0
decorator==5.1.1
defusedxml==0.7.1
et-xmlfile==1.1.0
executing==2.0.1
fastjsonschema==2.19.1
filelock==3.13.1
fonttools==4.47.2
fqdn==1.5.1
fsspec==2023.12.2
huggingface-hub==0.20.3
idna==3.6
ipykernel==6.29.0
ipython==8.21.0
ipywidgets==8.1.1
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
joblib==1.3.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.9.0
jupyter-lsp==2.2.2
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.5
jupyter_server_terminals==0.5.2
jupyterlab==4.0.12
jupyterlab-widgets==3.0.9
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.2
kiwisolver==1.4.5
lxml==4.9.3
MarkupSafe==2.1.4
matplotlib==3.8.1
matplotlib-inline==0.1.6
mistune==3.0.2
mpmath==1.3.0
nbclient==0.9.0
nbconvert==7.14.2
nbformat==5.9.2
nest-asyncio==1.6.0
networkx==3.2.1
nltk==3.8.1
notebook==7.0.7
notebook_shim==0.2.3
numpy==1.26.3
openpyxl==3.1.2
overrides==7.7.0
packaging==23.2
pandas==2.1.2
pandocfilters==1.5.1
parso==0.8.3
pexpect==4.9.0
pillow==10.2.0
platformdirs==4.2.0
prometheus-client==0.19.0
prompt-toolkit==3.0.43
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.17.2
pyparsing==3.1.1
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.4
PyYAML==6.0.1
pyzmq==25.1.2
qtconsole==5.5.1
QtPy==2.4.1
referencing==0.33.0
regex==2023.12.25
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.17.1
safetensors==0.4.2
scikit-learn==1.4.0
scipy==1.12.0
seaborn==0.13.2
Send2Trash==1.8.2
sentence-transformers==2.3.1
sentencepiece==0.1.99
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
stack-data==0.6.3
sympy==1.12
terminado==0.18.0
threadpoolctl==3.2.0
tinycss2==1.2.1
tokenizers==0.15.1
torch==2.2.0
tornado==6.4
tqdm==4.66.1
traitlets==5.14.1
transformers==4.37.2
types-python-dateutil==2.8.19.20240106
typing_extensions==4.9.0
tzdata==2023.4
uri-template==1.3.0
urllib3==2.2.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
widgetsnbextension==4.0.9
XlsxWriter==3.1.9

Hi @JHolmes89 Could you solve the problem?

Hi @pritamdeka , even I am getting the same 'model_type' error. I am trying to get the older cached version , Any workaround ?

@pritamdeka Not yet, still stumped.

^^ Also getting the same error, no workaround yet.

Same here, stopped working.

It should be working now. I have updated the original config file and it is working in Colab.

It's working for me now. Thanks for addressing this so promptly!

pritamdeka changed discussion status to closed

Sign up or log in to comment