MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / load

Method load

fastdeploy/eplb/utils.py:55–65  ·  view source on GitHub ↗

Load the object from a JSON file.

(self)

Source from the content-addressed store, hash-verified

53 return f"redundant_expert: dump expert workload result in {cost_time} us"
54
55 def load(self):
56 """Load the object from a JSON file."""
57 if not os.path.exists(self.meta_file_name):
58 return {}, f"redundant_expert: file {self.meta_file_name} is not exists"
59 try:
60 with open(self.meta_file_name, "r") as fin:
61 meta = json.load(fin)
62 self.__dict__.update(meta)
63 return self.__json__(), "ok"
64 except Exception as e:
65 return {}, f"redundant_expert: load file {self.meta_file_name} failed, {e}"
66
67
68def init_eplb_signals(config: FDConfig, ipc_signal_suffix):

Callers 15

test_load_successMethod · 0.95
mainFunction · 0.45
read_model_configMethod · 0.45
read_model_configMethod · 0.45
pdparams_weight_iteratorFunction · 0.45
load_reordered_expertsFunction · 0.45
load_ep_checkpointFunction · 0.45
kv_cache_scale_iteratorFunction · 0.45
get_all_weights_fileFunction · 0.45
load_kv_cache_scaleFunction · 0.45

Calls 3

__json__Method · 0.95
existsMethod · 0.45
updateMethod · 0.45