Is your feature request related to a problem? Please describe.
The console tqdm.tqdm progressbar can wreak havok in Jupyter notebooks if a cell is interrupted, so it is safer to use from tqdm.notebook import tqdm. The console progressbar is used internally in xo.optimize() (and maybe elsewhere?), but can't be customized.
Describe the solution you'd like
Either:
Add an option like progressbar=None to optimize(), to allow passing in a custom tqdm instance.
Internally, use from tqdm.auto import tqdm, which automatically detects if it is being imported in a notebook or console.
Both.
Let me know what you prefer - happy to open a PR if you think this is worthwile...
Sure - that would be great! It might be worth taking a look at PyMC3 too to see if you could contribute that to the sample method because the same problem will happen there.
Is your feature request related to a problem? Please describe.
The console
tqdm.tqdm
progressbar can wreak havok in Jupyter notebooks if a cell is interrupted, so it is safer to usefrom tqdm.notebook import tqdm
. The console progressbar is used internally inxo.optimize()
(and maybe elsewhere?), but can't be customized.Describe the solution you'd like Either:
progressbar=None
tooptimize()
, to allow passing in a custom tqdm instance.from tqdm.auto import tqdm
, which automatically detects if it is being imported in a notebook or console.Let me know what you prefer - happy to open a PR if you think this is worthwile...