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

Method dump

fastdeploy/eplb/utils.py:44–53  ·  view source on GitHub ↗

Dump the object to a JSON file.

(self)

Source from the content-addressed store, hash-verified

42 return self.__dict__
43
44 def dump(self):
45 """Dump the object to a JSON file."""
46 begin = time.time()
47 try:
48 with open(self.meta_file_name, "w") as fout:
49 json.dump(self.__dict__, fout)
50 except Exception as e:
51 return f"redundant_expert: dump expert workload failed, {e}"
52 cost_time = int((time.time() - begin) * 1000 * 1000)
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."""

Callers 15

test_dump_successMethod · 0.95
export_vocabularyFunction · 0.80
_write_to_fileMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80
write_to_jsonFunction · 0.80
main_asyncFunction · 0.80
write_to_jsonFunction · 0.80
save_safetensorsFunction · 0.80
real_fd_configFunction · 0.80
mock_fd_configFunction · 0.80

Calls

no outgoing calls

Tested by 15

test_dump_successMethod · 0.76
real_fd_configFunction · 0.64
mock_fd_configFunction · 0.64
mock_fd_config_tp2Function · 0.64
mock_fd_config_qwen3Function · 0.64
build_config_jsonFunction · 0.64
build_config_jsonMethod · 0.64
build_config_jsonMethod · 0.64
build_config_jsonMethod · 0.64
build_config_jsonMethod · 0.64
build_config_jsonMethod · 0.64