Skip to content

feat: enable JSON output#22

Merged
Hugoch merged 1 commit into
huggingface:mainfrom
Arno500:main
Mar 23, 2026
Merged

feat: enable JSON output#22
Hugoch merged 1 commit into
huggingface:mainfrom
Arno500:main

Conversation

@Arno500

@Arno500 Arno500 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

I rewrote most of the logging system. This allows to have proper JSON output for parsing by external program. There is a few standardized types that will limit the amount of structures required to implement.

The original text output is kept mostly as-is, except for the problem output, since it was not coherent depending on the problem. Some log lines (log_raw) are kept as-is because I was too lazy to implement them as JSON and they probably do not have that much value when used programmatically.

Serde could have been made optional, but it would have made the code more complicated and most of the dependencies are already there anyway.

@Arno500

Arno500 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

Here is a sample output:

cargo run -- --json
{"type":"detected_gpus","detected_gpus":[{"index":0,"name":"Tesla V100-PCIE-16GB","uuid":"ace03226-4b45-24c9-7ceb-2acf6c3bd2ad"},{"index":1,"name":"Tesla V100-PCIE-16GB","uuid":"2d1b21c2-9f4c-3413-6d8c-0fe2780096c9"}]}
{"type":"feature_detection","bf16":false,"fp8":false,"fp32":true,"gpu_memory_used":[{"gpu_idx":0,"memory_gb":13.9140625},{"gpu_idx":1,"memory_gb":13.9140625}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":1022,"flops":1123700883587072,"temp_celsius":55,"throttle_reason":""},{"gpu_idx":1,"nops":1022,"flops":1123700883587072,"temp_celsius":55,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":0,"flops":0,"temp_celsius":50,"throttle_reason":""},{"gpu_idx":1,"nops":0,"flops":0,"temp_celsius":50,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":64,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":64,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":1030,"flops":1132496976609280,"temp_celsius":60,"throttle_reason":""},{"gpu_idx":1,"nops":1030,"flops":1132496976609280,"temp_celsius":60,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":65,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":65,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":63,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":63,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":66,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":66,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":65,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":65,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":67,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":67,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":65,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":65,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":68,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":68,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":66,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":66,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":69,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":69,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":67,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":67,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":69,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":69,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":68,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":68,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":69,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":69,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":69,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":69,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":70,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":71,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":71,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":71,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":72,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":72,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":72,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":73,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":74,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":13,"flops":14293651161088,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""},{"gpu_idx":1,"nops":12,"flops":13194139533312,"temp_celsius":75,"throttle_reason":""}]}
{"type":"progress","gpus":[{"gpu_idx":0,"nops":9,"flops":9895604649984,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"},{"gpu_idx":1,"nops":9,"flops":9895604649984,"temp_celsius":75,"throttle_reason":"SW_POWER_CAP"}]}
{"type":"results","gpus":[{"burn_result":{"gpu_idx":0,"flops_max":14293651161088,"flops_min":13194139533312,"flops_sum":745468883632128,"flops_mean":13311944350573.717,"flops_m2":6.476388319364087e+24,"n_iters":56,"temp_max":75,"temp_sum":4128,"temp_min":68,"throttling_hw":0,"throttling_thermal_sw":0,"throttling_thermal_hw":0},"flops_avg":13311944350573.715},{"burn_result":{"gpu_idx":1,"flops_max":14293651161088,"flops_min":9895604649984,"flops_sum":749866930143232,"flops_mean":13390480895414.86,"flops_m2":2.443757192506717e+25,"n_iters":56,"temp_max":75,"temp_sum":4089,"temp_min":66,"throttling_hw":0,"throttling_thermal_sw":0,"throttling_thermal_hw":0},"flops_avg":13390480895414.857}]}
{"type":"problems","problems":[]}

@Arno500

Arno500 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Hugoch it's now been more than a month, would you have a bit of time to review that? πŸ™πŸ»
Thanks a lot!

@Hugoch

Hugoch commented Mar 17, 2026

Copy link
Copy Markdown
Member

Hey @Arno500 ! Thanks a lot for the contribution!

Do you have a clear use case of the JSON output as part of logging? I totally understand the need for a final JSON report for parsing (similar as #17) , but I'm not sure there's much value in parsing the ongoing burn?

@Arno500

Arno500 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Hi again!
Indeed! We're developping a software called "hwbench" where the goal is to be able to orchestrate multiple benchmarks to evaluate performance, consistency and environments of the machines that we test or buy. Since we're buying more and more GPU-based machines, we need to have a way to verify the behaviors of GPU as well.

gpu-fryer is definitely our go-to tool for this. But to orchestrate it, if we want to collect metrics as they come and follow the state, we definitely need a way to parse the output. We could have parsed "the old way", but it's really annoying to do and inconsistent whereas with the change we can just parse the JSON as-is in any language. (there are also the issues where the output format changes with the update, "oops, we added a line jump there because it was looking better", etc.)
In this specific case, being able to follow throttling events, etc. is crucial, since we collect and log everything to be able to graph the data afterwards with hwgraph.

Comment thread src/log.rs Outdated
Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
Comment thread src/log.rs Outdated
Comment thread src/main.rs Outdated
Comment thread src/logging.rs
Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
@Arno500

Arno500 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the thorough review. I did correct all the suggestions

@Hugoch Hugoch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the edits! A few more remarks and we should be good to merge :)

Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
Comment thread src/main.rs
Comment thread src/main.rs Outdated
Comment thread src/logging.rs Outdated
I rewrote most of the logging system. This allows to have proper JSON output for parsing by external program.
There is a few standardized types that will limit the amount of structures required to implement.

The original text output is kept mostly as-is, except for the `problem` output, since it was not coherent depending on the problem.
Some log lines (`log_raw`) are kept as-is because I was too lazy to implement them as JSON and they probably do not have that much value when used programmatically.

@Hugoch Hugoch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the modification @Arno500 ! Let's πŸš€

@Arno500

Arno500 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor Author

I let you merge whenever!

@Hugoch Hugoch merged commit edd3ba1 into huggingface:main Mar 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants