transformers: Files not accessible via IPv6

In certain cases (such as [1]), users only have access to the internet via IPv6. Unfortunately huggingface.co (or the domain hosting the files) does not have AAAA records and is not reachable from IPv6, causing ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. when triggering downloads:

from transformers import AutoTokenizer
AutoTokenizer.from_pretrained('facebook/mbart-large-cc25')

[1] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html#task-networking-vpc-dual-stack “One of the benefits of using a VPC in dual-stack mode is that tasks that are assigned an IPv6 address are able to access the internet as long as the VPC is configured with either an internet gateway or an egress-only internet gateway. NAT gateways are not needed.”

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Thank you @n1t0. I verified AutoTokenizer.from_pretrained and AutoModel.from_pretrained from an IPv6-only instance (no IPv4 route to internet) works now. Thank you for enabling dual-stack support on your end!

we are looking into this