MCPcopy
hub / github.com/ModelTC/LightLLM / load_data

Method load_data

lightllm/utils/petrel_helper.py:55–67  ·  view source on GitHub ↗
(self, path, ceph_read=True, fs_read=False, mode="r")

Source from the content-addressed store, hash-verified

53 yield cur_line
54
55 def load_data(self, path, ceph_read=True, fs_read=False, mode="r"):
56 if "s3://" not in path:
57 if not fs_read:
58 return open(path, mode)
59 else:
60 return open(path, mode).read()
61 else:
62 self.check_init()
63
64 if ceph_read:
65 return self._iter_cpeh_lines(path)
66 else:
67 return self.client.get(path)
68
69 @staticmethod
70 def load_pk(path, mode="r"):

Callers 5

__init__Method · 0.80
load_pkMethod · 0.80
load_jsonMethod · 0.80
download_jsonMethod · 0.80
download_fileMethod · 0.80

Calls 4

check_initMethod · 0.95
_iter_cpeh_linesMethod · 0.95
readMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected