Spaces:
Running on Zero
Running on Zero
Download openmodellab/reporting/csv_writer.py from ajaygovind/OpenModelLab: direct link, hf CLI and curl.
- Browser
- Download file 646 Bytes
-
https://huggingface.co/spaces/ajaygovind/OpenModelLab/resolve/main/openmodellab/reporting/csv_writer.py
- Command line
-
hf download hf://spaces/ajaygovind/OpenModelLab/openmodellab/reporting/csv_writer.py
-
curl -L -o csv_writer.py https://huggingface.co/spaces/ajaygovind/OpenModelLab/resolve/main/openmodellab/reporting/csv_writer.py
646 Bytes
| import csv | |
| def save_csv(results, filename): | |
| with open( | |
| filename, | |
| "w", | |
| newline="" | |
| ) as f: | |
| writer = csv.writer(f) | |
| writer.writerow([ | |
| "Model", | |
| "Parameters", | |
| "Layers", | |
| "Hidden Size", | |
| "Latency(ms)", | |
| "Throughput" | |
| ]) | |
| for item in results: | |
| writer.writerow([ | |
| item["model"], | |
| item["parameters"], | |
| item["layers"], | |
| item["hidden_size"], | |
| item["latency_ms"], | |
| item["throughput"] | |
| ]) | |
| return filename | |