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

Method download_json

lightllm/utils/petrel_helper.py:86–93  ·  view source on GitHub ↗
(path, local_path, mode="r")

Source from the content-addressed store, hash-verified

84
85 @staticmethod
86 def download_json(path, local_path, mode="r"):
87 if "s3://" not in path:
88 js = json.load(open(path, mode))
89 else:
90 js = json.loads(PetrelHelper._petrel_helper.load_data(path, ceph_read=False))
91
92 with open(local_path, "w") as f:
93 json.dump(js, f)
94
95 @staticmethod
96 def download_file(path, local_path, mode="r"):

Callers 1

s3_model_prepareFunction · 0.80

Calls 2

loadMethod · 0.80
load_dataMethod · 0.80

Tested by

no test coverage detected