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

Function write_to_json

fastdeploy/benchmarks/serve.py:974–977  ·  view source on GitHub ↗

write_to_json

(filename: str, records: list)

Source from the content-addressed store, hash-verified

972
973
974def write_to_json(filename: str, records: list) -> None:
975 """write_to_json"""
976 with open(filename, "w") as f:
977 json.dump(records, f, cls=InfEncoder)
978
979
980def save_to_pytorch_benchmark_format(args: argparse.Namespace, results: dict[str, Any], file_name: str) -> None:

Callers 2

test_write_to_jsonMethod · 0.90

Calls 1

dumpMethod · 0.80

Tested by 1

test_write_to_jsonMethod · 0.72