# How to extract convergence status in Optim.jl?

**URL:** <https://discourse.julialang.org/t/how-to-extract-convergence-status-in-optim-jl/110430>\
**Category:** Optimization (Mathematical)\
**Created:** [February 20, 2024, 12:33am UTC](https://discourse.julialang.org/t/how-to-extract-convergence-status-in-optim-jl/110430 "2024-02-20T00:33:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [February 20, 2024, 12:33am UTC](https://discourse.julialang.org/t/how-to-extract-convergence-status-in-optim-jl/110430/1 "2024-02-20T00:33:04Z")

</div>

I ran several optimization problems with different models, but some didn’t seem to calculate the result but spit out some random results. So, I would like to know how to extract the status of the ‘optimized’ results, but I cannot know quickly. I know if we just call the object of the ‘optimize’, then it shows the status, but I would like to call it and assign it to a data frame column. For example, if the code for calling the status of success or failure is `status`, I would expect to call the result is

```julia
Object = optimize(function(x),x,LBFGS(); autodiff = :forward
result = Object.status

```

Is this possible? Can someone help with this?

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [February 20, 2024, 12:34am UTC](https://discourse.julialang.org/t/how-to-extract-convergence-status-in-optim-jl/110430/2 "2024-02-20T00:34:08Z")

</div>

`Optim.converged(opt)`

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [February 20, 2024, 12:41am UTC](https://discourse.julialang.org/t/how-to-extract-convergence-status-in-optim-jl/110430/3 "2024-02-20T00:41:02Z")

</div>

Checked! Thanks a lot!
