Benchmark.Codegen: fixes codegen printers
This fixes codegen printers:
- Fix of
pp_solution
- put all in a vertical box
- skip the local model names at the score printing, which are redundant
- Change the comment in the generated code
- Some code simplifications (an eta-reduction and
let open Format in ..
)
Old description of this MR:
This fixes codegen printers:
- fix of
pp_solution
- avoid repeating
Format
module prefixes - fix the expected string of a test
Now octez-snoop solution print xxx.sol
prints out like the following:
snoop/_snoop_20230224_2000_v16.0-rc1-1132-ga0d900d17c/inference_results/inferred_encoding.sol:
inference_model_name: encoding
free_variables:
builtin/Timer_latency = 16.06
shell/encoding/B58CHECK_DECODING_CHAIN_ID_const = 1454.61333333
shell/encoding/B58CHECK_DECODING_PUBLIC_KEY_HASH_bls_const = 3432.36666667
shell/encoding/B58CHECK_DECODING_PUBLIC_KEY_HASH_ed25519_const = 3162.64
...
scores:
builtin/TIMER_LATENCY : R2: NA , RMSE: 1.138596
shell/encoding/B58CHECK_DECODING_CHAIN_ID : R2: NA , RMSE: 73.145836
shell/encoding/B58CHECK_DECODING_PUBLIC_KEY_HASH_bls : R2: NA , RMSE: 11.315091
shell/encoding/B58CHECK_DECODING_PUBLIC_KEY_HASH_ed25519 : R2: NA , RMSE: 9.159148
...
Edited by Jun Furuse