pytorch / text

Models, data loaders and abstractions for language processing, powered by PyTorch
https://pytorch.org/text
BSD 3-Clause "New" or "Revised" License
3.49k stars 813 forks source link

[text/torchtext/vocab/vectors.py] Link to pretrained Glove embedding not working (404) #2188

Open Eleven1Liu opened 1 year ago

Eleven1Liu commented 1 year ago

🐛 Bug

Describe the bug Get 404 when downloading glove.6B.*d. The links to the pretrained word vectors in Glove (mirror) were not found, which makes links in class Glove (https://github.com/pytorch/text/blob/main/torchtext/vocab/vectors.py#L213-L217) failed.

To Reproduce Steps to reproduce the behavior:

  1. Run the example code here.
import torchtext as text

examples = ['chip', 'baby', 'Beautiful']
vec = text.vocab.GloVe(name='6B', dim=50)
ret = vec.get_vecs_by_tokens(examples, lower_case_backup=True)
  1. See error: HTTPError: HTTP Error 404: Not Found

Expected behavior Download pretrained glove embeddings.

Screenshots image

Environment