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

Method _build_data_dir

src/evaluate/module.py:266–275  ·  view source on GitHub ↗

Path of this evaluation module in cache_dir: Will be: self._data_dir_root/self.name/self.config_name/self.hash (if not none)/ If any of these element is missing or if ``with_version=False`` the corresponding subfolders are dropped.

(self)

Source from the content-addressed store, hash-verified

264 )
265
266 def _build_data_dir(self):
267 """Path of this evaluation module in cache_dir:
268 Will be:
269 self._data_dir_root/self.name/self.config_name/self.hash (if not none)/
270 If any of these element is missing or if ``with_version=False`` the corresponding subfolders are dropped.
271 """
272 builder_data_dir = self._data_dir_root
273 builder_data_dir = os.path.join(builder_data_dir, self.name, self.config_name)
274 os.makedirs(builder_data_dir, exist_ok=True)
275 return builder_data_dir
276
277 def _create_cache_file(self, timeout=1) -> Tuple[str, FileLock]:
278 """Create a new cache file. If the default cache file is used, we generated a new hash."""

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected