You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry to sound like a broken record and I know we discussed in #10 but there's still an infinite loop path in bisect. I confirm because I run into it sporadically, and editing this line to read if c.dϕ >= 0 || numfg>10 to break out if it tries more than 10 bisect steps fixes it for me.
No doubt I have some numerically noisy gradients causing this, and I'm happy if the package sends me a warning or even errors when bisect fails due to that, but just infinite looping really kills my analysis (eg I run 100 sims and step away from my computer for a while, only to come back and find sim 3 got stuck in an infinite loop and it never went further).
Hi, it seems I have exactly the same issue and in my case it would be useful if the optimizer returned something (e.g., just an initial guess x_0). Is there some simple way to force it to stop bisecting after a few attempts and give up (just returning an initial condition)?
Thank you.
Oh, I am afraid not really right now. I am developing an MPS-like architecture for image classification and when I optimize MPS tensors one by one, sometimes optimizations just gets stuck on some tensor and does not proceed to the next tensors.
Hi, if I just download OptimKit.jl and then add this condition numfg>10 as suggested by @marius311, could you please suggest how I then can use it? If I just include a line include("../../OptimKit/src/OptimKit.jl"), I then get an error UndefVarError: ConjugateGradient not defined. But if I also add another line include("../../OptimKit/src/gd.jl"), I get another error LoadError: UndefVarError: AbstractLineSearch not defined. Finally, if I include the following lines
using Printf
include("../../OptimKit/src/OptimKit.jl")
include("../../OptimKit/src/linesearches.jl")
include("../../OptimKit/src/gd.jl")
I get this error: LoadError: UndefVarError: OptimizationAlgorithm not defined (and I always get WARNING: replacing module OptimKit, even though I ran Pkg.rm("OptimKit.jl) before).
Thank you.
Thank you @marius311! I use the first approach (with @eval). Sorry for my ignorance, but how should I proceed with the second approach? I mean, I execute pkg> dev --local OptimKit, but what's next? One part of an output of the previous command is OptimKit v0.3.1 ⇒ v0.3.2 dev/OptimKit, but when I cd to \dev, I cannot find OptimKit there.
Thank you!
Activity
Jutho commentedon Feb 12, 2021
I am happy to accept a PR, but I would just make a separate branch in the
iffor the casenumfg>10and print out a warning indeed.ArtemStrashko commentedon Feb 9, 2022
Hi, it seems I have exactly the same issue and in my case it would be useful if the optimizer returned something (e.g., just an initial guess x_0). Is there some simple way to force it to stop bisecting after a few attempts and give up (just returning an initial condition)?
Thank you.
Jutho commentedon Feb 10, 2022
I will try to look at this soon; the linesearch logic should be changed somewhat to allow for a graceful return indeed.
maartenvd commentedon Feb 10, 2022
out of curiosity, is there a small minimal example somewhere of bisect looping?
ArtemStrashko commentedon Feb 10, 2022
Oh, I am afraid not really right now. I am developing an MPS-like architecture for image classification and when I optimize MPS tensors one by one, sometimes optimizations just gets stuck on some tensor and does not proceed to the next tensors.
ArtemStrashko commentedon Feb 11, 2022
Hi, if I just download OptimKit.jl and then add this condition
numfg>10as suggested by @marius311, could you please suggest how I then can use it? If I just include a lineinclude("../../OptimKit/src/OptimKit.jl"), I then get an errorUndefVarError: ConjugateGradient not defined. But if I also add another lineinclude("../../OptimKit/src/gd.jl"), I get another errorLoadError: UndefVarError: AbstractLineSearch not defined. Finally, if I include the following linesI get this error:
LoadError: UndefVarError: OptimizationAlgorithm not defined(and I always getWARNING: replacing module OptimKit, even though I ranPkg.rm("OptimKit.jl)before).Thank you.
marius311 commentedon Feb 11, 2022
One hack is just to do
Another is you could
pkg> dev --local OptimKitand edit the files directly.ArtemStrashko commentedon Feb 11, 2022
Thank you @marius311! I use the first approach (with @eval). Sorry for my ignorance, but how should I proceed with the second approach? I mean, I execute
pkg> dev --local OptimKit, but what's next? One part of an output of the previous command isOptimKit v0.3.1 ⇒ v0.3.2 dev/OptimKit, but when Icdto\dev, I cannot findOptimKitthere.Thank you!
Jutho commentedon Oct 2, 2026
Fixed by #48