MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / from_url

Method from_url

tinygrad/tensor.py:519–529  ·  view source on GitHub ↗

Creates a Tensor from a URL. This is the preferred way to access Internet resources. It currently returns a DISK Tensor, but in the future it may return an HTTP Tensor. This also will soon become lazy (when possible) and not print progress without DEBUG. The `gunzip` flag will

(url:str, gunzip:bool=False, **kwargs)

Source from the content-addressed store, hash-verified

517
518 @staticmethod
519 def from_url(url:str, gunzip:bool=False, **kwargs) -> Tensor:
520 """
521 Creates a Tensor from a URL.
522
523 This is the preferred way to access Internet resources.
524 It currently returns a DISK Tensor, but in the future it may return an HTTP Tensor.
525 This also will soon become lazy (when possible) and not print progress without DEBUG.
526
527 The `gunzip` flag will gzip extract the resource and return an extracted Tensor.
528 """
529 return Tensor(fetch(url, gunzip=gunzip), **kwargs)
530
531 _seed: int = int(time.time())
532 _device_seeds: dict[str, Tensor] = {}

Callers 5

_mnistFunction · 0.80
cifarFunction · 0.80
decode.pyFile · 0.80
fetch_weightsFunction · 0.80

Calls 2

fetchFunction · 0.90
TensorClass · 0.85