Downloading from torch.hub into memory

Hi forum!

Question: Does torch.hub support downloading a file from URL directly to memory without touching disk first? Such as the utility download_url_to_file just without the _to_file :smiley:

I am hitting the classic issue of AWS Lambda of “No more space on device” when it hits the space limits of what can be stored on temporary disk on a Lambda instance. Typically I would load a file into memory which is a much more loose limitation on Lambda.

It may be a very practical question, but highly appreciated if anyone here have some insights that I don’t.

Thank you in advance!