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)
| 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] = {} |