MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / get_git_info

Function get_git_info

seq2seq/utils.py:466–482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464
465
466def get_git_info():
467 try:
468 repo = git.Repo(search_parent_directories=True)
469 repo_infos = {
470 "repo_id": str(repo),
471 "repo_sha": str(repo.head.object.hexsha),
472 "repo_branch": str(repo.active_branch),
473 "hostname": str(socket.gethostname()),
474 }
475 return repo_infos
476 except TypeError:
477 return {
478 "repo_id": None,
479 "repo_sha": None,
480 "repo_branch": None,
481 "hostname": None,
482 }
483
484
485ROUGE_KEYS = ["rouge1", "rouge2", "rougeL", "rougeLsum"]

Callers 1

save_git_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected