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

Method read_from_disk

scripts/release_notes/common.py:323–327  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

321 return self.data[commit]
322
323 def read_from_disk(self):
324 with open(self.path, "r") as f:
325 data = json.load(f)
326 data = {commit: dict_to_features(dct) for commit, dct in data.items()}
327 return data
328
329 def write_to_disk(self):
330 data = {commit: features._asdict() for commit, features in self.data.items()}

Callers 1

__init__Method · 0.95

Calls 3

dict_to_featuresFunction · 0.85
loadMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected