MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / read_general

Function read_general

Large-DiT-T2I/data/data_reader.py:11–17  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

9logger = logging.getLogger(__name__)
10
11def read_general(path) -> Union[str, BytesIO]:
12 if "s3://" in path:
13 init_ceph_client_if_needed()
14 file_bytes = BytesIO(client.get(path))
15 return file_bytes
16 else:
17 return path
18
19def init_ceph_client_if_needed():
20 global client

Callers 1

process_itemMethod · 0.90

Calls 1

Tested by

no test coverage detected