JuliaSmoothOptimizers / SolverTools.jl

Tools for developing nonlinear optimization solvers.
Other
26 stars 18 forks source link

Allow missing values in log_row #154

Closed abelsiqueira closed 3 years ago

abelsiqueira commented 3 years ago

Related to #151

I ended up using Type instead of Val{Type} because it was easier.

codecov[bot] commented 3 years ago

Codecov Report

Merging #154 (6c150de) into master (d12db21) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   90.76%   90.80%   +0.03%     
==========================================
  Files          10       10              
  Lines         260      261       +1     
==========================================
+ Hits          236      237       +1     
  Misses         24       24              
Impacted Files Coverage Δ
src/auxiliary/logger.jl 87.50% <100.00%> (+0.83%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d12db21...5806497. Read the comment docs.

tmigot commented 3 years ago

It looks great, thanks! Here is an example with logs of what I get with intertwined loops:

[ Info:              Tr       0      20  -1.9e+00  -1.7e+00         -   6.3e-01         -         -          success   4.0e-03   1.6e+01
[ Info:               T       3      20  -1.9e+00  -1.7e+00   2.9e-07   6.3e-01   6.3e+01   7.6e-01          success         -         -
[ Info:               F       0      21         -         -         -   2.8e-02         -         -          success   1.7e-01   1.0e+00
[ Info:               N       1      22  -1.7e+00  -1.7e+00   2.5e-07   2.8e-02   6.3e+01   2.5e-02          success         -         -
[ Info:               F       0      23         -         -         -   6.3e-05         -         -          success   7.9e-03   1.0e+00
[ Info:               N       2      24  -1.7e+00  -1.7e+00   2.5e-07   6.3e-05   6.3e+01   1.0e-05          success         -         -
[ Info:               F       0      25         -         -         -   3.3e-10         -         -          success   1.8e-05   1.0e+00
[ Info:               N       3      26  -1.7e+00  -1.7e+00   2.5e-07   3.3e-10   6.3e+01   1.0e-05          success         -         -
"Execution stats: first-order stationary"
tmigot commented 3 years ago

You could also add a line in the unit test to improve the coverage:

log_header([:col_float, :col_int, :col_symbol, :col_string], [Float64, Int, Symbol, String])
log_row([1.0, 1, :one, "one"])
log_row([Float64, Int, Symbol, String])
dpo commented 3 years ago

Thank you!