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

Function _setup_path

src/evaluate/saving.py:54–64  ·  view source on GitHub ↗
(path_or_file, current_time)

Source from the content-addressed store, hash-verified

52
53
54def _setup_path(path_or_file, current_time):
55 path_or_file = Path(path_or_file)
56 is_file = len(path_or_file.suffix) > 0
57 if is_file:
58 folder = path_or_file.parent
59 file_name = path_or_file.name
60 else:
61 folder = path_or_file
62 file_name = "result-" + current_time.strftime("%Y_%m_%d-%H_%M_%S") + ".json"
63 folder.mkdir(parents=True, exist_ok=True)
64 return folder / file_name
65
66
67def _git_commit_hash():

Callers 1

saveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…