JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.11k stars 213 forks source link

Verbose option #1042

Closed jparedes-m closed 1 year ago

jparedes-m commented 1 year ago

Hello, I started with the optimization today and it gets the work done. However, my function already produces some text and I don't want to get the 'status' text

(The text output from my function goes here)
 * Status: success

 * Candidate solution
    Final objective value:     1.840863e-04

 * Found with
    Algorithm:     Nelder-Mead

 * Convergence measures
    √(Σ(yᵢ-ȳ)²)/n ≤ 1.0e-12

 * Work counters
    Seconds run:   28  (vs limit Inf)
    Iterations:    339
    f(x) calls:    639

I think this is on the form results displayed, but I'd love to know if there's an option to turn this display off (like verbose = false) or something like that.

pkofod commented 1 year ago

You can append a line with ; to suppress the show methods in Julia, it's not really an Optim.jl issue, all Julia objects have show methods (and if not their own then fallbacks). Hope you can get your desired result.