MCPcopy
hub / github.com/XPixelGroup/DiffBIR / get

Method get

diffbir/dataset/file_backend.py:91–103  ·  view source on GitHub ↗

Read data from a given ``filepath`` with 'rb' mode. Args: filepath (str or Path): Path to read data. Returns: bytes: The loaded bytes.

(self, filepath: Union[str, Path])

Source from the content-addressed store, hash-verified

89 return re.sub(r'\\+', '/', filepath)
90
91 def get(self, filepath: Union[str, Path]) -> bytes:
92 """Read data from a given ``filepath`` with 'rb' mode.
93
94 Args:
95 filepath (str or Path): Path to read data.
96
97 Returns:
98 bytes: The loaded bytes.
99 """
100 filepath = self._map_path(filepath)
101 filepath = self._format_path(filepath)
102 value = self._client.Get(filepath)
103 return value
104
105
106class HardDiskBackend(BaseStorageBackend):

Callers 15

generate_streamMethod · 0.45
load_imageFunction · 0.45
get_model_listFunction · 0.45
generate_streamMethod · 0.45
register_workerFunction · 0.45
eval_gpt_review.pyFile · 0.45
eval_pred_listMethod · 0.45
load_imageFunction · 0.45
instantiate_from_configFunction · 0.45
common.pyFile · 0.45

Calls 2

_map_pathMethod · 0.95
_format_pathMethod · 0.95

Tested by

no test coverage detected