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

Method __init__

scripts/release_notes/common.py:308–314  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

306
307class _CommitDataCache:
308 def __init__(self, path):
309 self.path = path
310 self.data = {}
311 if os.path.exists(path):
312 self.data = self.read_from_disk()
313 else:
314 os.makedirs(Path(path).parent, exist_ok=True)
315
316 def get(self, commit):
317 if commit not in self.data.keys():

Callers

nothing calls this directly

Calls 3

read_from_diskMethod · 0.95
PathClass · 0.85
makedirsMethod · 0.80

Tested by

no test coverage detected