MCPcopy Create free account
hub / github.com/huggingface/evaluate / _git_commit_hash

Function _git_commit_hash

src/evaluate/saving.py:67–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65
66
67def _git_commit_hash():
68 res = subprocess.run("git rev-parse --is-inside-work-tree".split(), cwd="./", stdout=subprocess.PIPE)
69 if res.stdout.decode().strip() == "true":
70 res = subprocess.run("git rev-parse HEAD".split(), cwd=os.getcwd(), stdout=subprocess.PIPE)
71 return res.stdout.decode().strip()
72 else:
73 return None

Callers 1

saveFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…