We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In optimization/verbose_optimization.py, the following code tries to check whether it's being run from within an IPython notebook:
try: # pragma: no cover from IPython.display import display from ipywidgets import IntProgress, HTML, Box, VBox, HBox self.text = HTML(width='100%') self.progress = IntProgress(min=0, max=maxiters) #self.progresstext = Text(width='100%', disabled=True, value='0/{}'.format(maxiters)) self.model_show = HTML() self.ipython_notebook = ipython_notebook except: # Not in Ipython notebook self.ipython_notebook = False
but when I run code in my shell (not a notebook) that calls this, self.ipython_notebook is True after this block executes.
self.ipython_notebook
True
According to this stackoverflow post, a good way to do this check is
try: get_ipython self.ipython_notebook=True except: self.ipython_notebook=False
For reference: python 3.6.7 ipython 6.5.0 ipywidgets 7.4.0 paramz 0.9.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In optimization/verbose_optimization.py, the following code tries to check whether it's being run from within an IPython notebook:
but when I run code in my shell (not a notebook) that calls this,
self.ipython_notebook
isTrue
after this block executes.According to this stackoverflow post, a good way to do this check is
For reference:
python 3.6.7
ipython 6.5.0
ipywidgets 7.4.0
paramz 0.9.4
The text was updated successfully, but these errors were encountered: