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

Segmentation fault when running python transformer_infer.py #12

Open
CircleCly opened this issue Feb 5, 2024 · 0 comments
Open

Segmentation fault when running python transformer_infer.py #12

CircleCly opened this issue Feb 5, 2024 · 0 comments

Comments

@CircleCly
Copy link

CircleCly commented Feb 5, 2024

Hi, I am on an AWS EC2 Machine (Amazon Linux 2), and I followed the instructions in the setup and are able to install the library dependencies. I also downloaded all the checkpoints on my machine. However, when I run python transformer_infer.py, I get the following message and a segmentation fault:

/opt/conda/envs/pheme3/lib/python3.10/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
/opt/conda/envs/pheme3/lib/python3.10/site-packages/torch_audiomentations/utils/io.py:27: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
DEBUG:fsspec.local:open file: /home/ec2-user/wam/pheme/ckpt/s2a/s2a.ckpt
Non-A100 GPU detected, using math or mem efficient attention if input tensor is on cuda
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): huggingface.co:443
DEBUG:urllib3.connectionpool:https://huggingface.co:443 "HEAD /pyannote/embedding/resolve/main/pytorch_model.bin HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:https://huggingface.co:443 "HEAD /pyannote/embedding/resolve/main/config.yaml HTTP/1.1" 200 0
DEBUG:fsspec.local:open file: /home/ec2-user/.cache/torch/pyannote/models--pyannote--embedding/snapshots/c6335d8f1cd77b30084387468a6cf26fea90009b/pytorch_model.bin
DEBUG:fsspec.local:open file: /home/ec2-user/.cache/torch/pyannote/models--pyannote--embedding/snapshots/c6335d8f1cd77b30084387468a6cf26fea90009b/pytorch_model.bin
Lightning automatically upgraded your loaded checkpoint from v1.2.7 to v2.1.2. To apply the upgrade to your files permanently, run `python -m pytorch_lightning.utilities.upgrade_checkpoint ../../.cache/torch/pyannote/models--pyannote--embedding/snapshots/c6335d8f1cd77b30084387468a6cf26fea90009b/pytorch_model.bin`
Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x.
Model was trained with torch 1.8.1+cu102, yours is 2.1.1+cu121. Bad things might happen unless you revert torch to 1.x.
Segmentation fault

I have tried debugging the python script and stepping into function calls.

This is the last non-library function call I was at before erroring, which was in the TextTokenizer class in semantic_dataset.py. From this I believe the phonemizer backend is erroring.
image

I tried stepping into the phonemizer library as well, and the program errors out after this line is executed:
image

And this is my call stack:
image

Any help on the issue would be greatly appreciated!

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