modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
201 stars 31 forks source link

[BUG]: Error while running the first model #158

Open mbhey opened 1 month ago

mbhey commented 1 month ago

Bug description

When I tried to run the model I received this:


mm@DESKTOP-RPTFVLB:~/max/examples/inference/bert-python-torchscript$ bash run.sh
+ INPUT_EXAMPLE='Paris is the [MASK] of France.'
+ MODEL_PATH=../../models/bert-mlm.torchscript
++ dirname run.sh
+ cd .
+ python3 ../common/bert-torchscript/download-model.py -o ../../models/bert-mlm.torchscript --mlm
/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (4.0.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Downloading model...
/home/mm/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
config.json: 100%|█████████████████████████████████████████████████████████| 570/570 [00:00<00:00, 5.95MB/s]
model.safetensors:  38%|██████████████████▋                              | 168M/440M [00:31<00:52, 5.15MB/s]
[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

tried again to run it gives error:

OSError: It looks like the config file at '/home/mohamed/.cache/huggingface/hub/models--bert-base-uncased/snapshots/86b5e0934494bd15c9632b12f734a8a67f723594/config.json' is not a valid JSON file.

I tried to open the mentioned config file but it was empty!

Steps to reproduce

System information

- What OS did you do install MAX on ?
WSL Ubuntu 22.04 on windows 11.
- Provide version information for MAX by pasting the output of max -v`
max 24.3.0 (9882e19d)
Modular version 24.3.0-9882e19d-release
- Provide version information for Mojo by pasting the output of mojo -v`
mojo 24.3.0 (9882e19d)
- Provide Modular CLI version by pasting the output of `modular -v`
modular 0.7.4 (df7a9e8b)
ehsanmok commented 1 month ago

Thanks for reporting! that's odd and seems a huggingface issue. What version of transformers are you using?

ehsanmok commented 1 month ago

Curious have you resolved the issue?