MCPcopy Create free account
hub / github.com/cjrd/self-supervised-pretraining / get_hash

Function get_hash

OpenSelfSup/setup.py:52–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def get_hash():
53 if os.path.exists('.git'):
54 sha = get_git_hash()[:7]
55 elif os.path.exists(version_file):
56 try:
57 from openselfsup.version import __version__
58 sha = __version__.split('+')[-1]
59 except ImportError:
60 raise ImportError('Unable to get git version')
61 else:
62 sha = 'unknown'
63
64 return sha
65
66
67def write_version_py():

Callers 1

write_version_pyFunction · 0.85

Calls 1

get_git_hashFunction · 0.85

Tested by

no test coverage detected