MCPcopy Create free account
hub / github.com/pytorch/pytorch / read

Method read

torch/distributed/checkpoint/utils.py:387–388  ·  view source on GitHub ↗
(self, size=-1)

Source from the content-addressed store, hash-verified

385 return self.base_stream.readinto(b) # type: ignore[attr-defined]
386
387 def read(self, size=-1):
388 return self.base_stream.read(size)
389
390
391def _create_file_view(file: io.IOBase, offset: int, length: int) -> io.IOBase:

Callers 15

loadMethod · 0.45
_is_zipfileFunction · 0.45
_check_container_sourceFunction · 0.45
legacy_loadFunction · 0.45
_read_urlFunction · 0.45
download_url_to_fileFunction · 0.45
compile_fileMethod · 0.45
load_binunicodeMethod · 0.45
hash_source_filesFunction · 0.45
_maybe_writeFunction · 0.45
make_videoFunction · 0.45

Calls

no outgoing calls

Tested by 11

_maybe_subprocess_runMethod · 0.36
_run_reproMethod · 0.36
loadMethod · 0.36
syncMethod · 0.36
test_get_rankMethod · 0.36
check_fileFunction · 0.36
get_pytorch_labelsFunction · 0.36
fetch_and_cacheFunction · 0.36