MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / write_to_csv

Function write_to_csv

benchmarks/utils.py:80–85  ·  view source on GitHub ↗

Serializes a dictionary into a CSV file.

(file_name: str, data_dict: Dict[str, Union[str, bool, float]])

Source from the content-addressed store, hash-verified

78
79
80def write_to_csv(file_name: str, data_dict: Dict[str, Union[str, bool, float]]):
81 """Serializes a dictionary into a CSV file."""
82 with open(file_name, mode="w", newline="") as csvfile:
83 writer = csv.DictWriter(csvfile, fieldnames=BENCHMARK_FIELDS)
84 writer.writeheader()
85 writer.writerow(data_dict)
86
87
88def collate_csv(input_files: List[str], output_file: str):

Callers 2

benchmarkMethod · 0.90
benchmarkMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected