Skip to content
New issue

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

Infinite feedback loop caused by rapidly modifying value when displaying IntInput widget multiple times in notebook #7325

Open
1 task
Kramin42 opened this issue Sep 26, 2024 · 0 comments
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@Kramin42
Copy link

ALL software version info

This issue is with with panel 1.4.5 (bokeh 3.4.3). I was also able to reproduce with panel 1.5.0, though it happens less often with 1.5.0 as instead the client side widgets usually just stop at different values instead of getting into a feedback loop (see #7324).

Software Version Info
browser: Chrome Version 126.0.6478.126 (Official Build) (64-bit)

pip freeze output:
aiofiles==22.1.0
aiohttp==3.9.5
aiosignal==1.3.1
aiosqlite==0.20.0
alabaster==0.7.13
alembic==1.13.1
annotated-types==0.6.0
anyio==4.3.0
appdirs==1.4.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.14.0
backcall==0.2.0
beautifulsoup4==4.12.3
bleach==6.1.0
bokeh==3.4.3
bqplot==0.12.43
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.0.0
colorama==0.4.6
colorcet==3.1.0
comm==0.2.2
contourpy==1.2.1
copier==9.3.1
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
deprecation==2.1.0
docutils==0.18.1
doit==0.36.0
dunamai==1.22.0
entrypoints==0.4
executing==2.0.1
fastapi==0.110.0
fastjsonschema==2.19.1
flexcache==0.3
flexparser==0.3.1
fonttools==4.43.1
fqdn==1.5.1
frozenlist==1.4.1
fsspec==2024.9.0
funcy==2.0
future==1.0.0
greenlet==3.0.3
h11==0.14.0
h5py==3.11.0
holoviews==1.18.3
httpcore==1.0.4
httpx==0.27.0
hvplot==0.10.0
idna==3.6
imagesize==1.4.1
importlib_metadata==7.0.2
ipydatawidgets==4.3.5
ipygany==0.5.0
ipykernel==6.29.3
ipython==8.22.2
ipython-genutils==0.2.0
ipyvolume==0.6.3
ipyvue==1.10.2
ipyvuetify==1.9.2
ipywebrtc==0.6.0
ipywidgets==8.1.2
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.4
jinja2-ansible-filters==1.3.2
jinja2-time==0.2.0
json5==0.9.24
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.9.1
jupyter-lsp==2.2.4
jupyter-ydoc==0.2.5
jupyter_client==8.6.1
jupyter_core==5.7.2
jupyter_packaging==0.12.3
jupyter_server==2.13.0
jupyter_server_fileid==0.9.2
jupyter_server_proxy==4.2.0
jupyter_server_terminals==0.5.3
jupyter_server_ydoc==0.8.0
jupyterlab==4.2.5
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.3
jupyterlab_widgets==3.0.10
jupyterlite==0.2.3
jupyterlite-core==0.2.3
jupyterlite-javascript-kernel==0.2.3
kiwisolver==1.4.5
linkify-it-py==2.0.3
Mako==1.3.2
Markdown==3.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.0
matplotlib-inline==0.1.6
mdit-py-plugins==0.4.1
mdurl==0.1.2
mistune==3.0.2
msgpack==1.0.8
msgpack-numpy==0.4.8
multidict==6.0.5
nbclassic==1.1.0
nbclient==0.10.0
nbconvert==7.16.2
nbformat==5.10.3
nest-asyncio==1.6.0
notebook==7.1.2
notebook_shim==0.2.4
numpy==1.26.4
numpydoc==1.6.0
overrides==7.7.0
packaging==24.0
pandas==2.2.1
pandocfilters==1.5.1
panel==1.4.5
param==2.1.0
parso==0.8.3
pathspec==0.12.1
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
Pint==0.24.3
platformdirs==4.2.0
plotly==5.18.0
plumbum==1.8.3
pooch==1.8.2
prometheus_client==0.20.0
prompt-toolkit==3.0.43
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pydantic==2.5.3
pydantic_core==2.14.6
Pygments==2.17.2
pyparsing==3.0.9
pyrsistent==0.19.1
python-dateutil==2.9.0.post0
python-dotenv==0.21.1
python-json-logger==2.0.7
python-multipart==0.0.5
pythreejs==2.4.2
pytz==2024.1
pyvista==0.44.1
pyviz_comms==3.0.2
PyYAML==6.0.1
pyyaml-include==2.1
pyzmq==25.1.2
qtconsole==5.5.1
QtPy==2.4.1
questionary==1.10.0
referencing==0.34.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.18.0
scipy==1.11.3
scooby==0.10.0
Send2Trash==1.8.2
simpervisor==1.0.0
six==1.16.0
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.5
Sphinx==7.2.6
sphinx-rtd-theme==1.3.0
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-serializinghtml==1.1.9
SQLAlchemy==2.0.29
sqlmodel==0.0.16
stack-data==0.6.3
starlette==0.36.3
tabulate==0.9.0
tenacity==8.2.3
terminado==0.18.1
tinycss2==1.2.1
tomli_w==1.0.0
tomlkit==0.12.5
tornado==6.4
tqdm==4.66.4
traitlets==5.14.2
traittypes==0.2.1
types-python-dateutil==2.9.0.20240316
typing_extensions==4.10.0
tzdata==2024.1
uc-micro-py==1.0.3
uncertainties==3.1.7
uri-template==1.3.0
urllib3==2.2.1
uvicorn==0.28.0
viola==0.3.8
vtk==9.3.1
watchfiles==0.22.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
websockets==12.0
widgetsnbextension==4.0.10
xyzservices==2024.6.0
y-py==0.6.2
yarl==1.9.4
ypy-websocket==0.8.4
zipp==3.18.1

Description of expected behavior and the observed behavior

I expect multiple views of an input to stabilise to a single value in a reasonable timeframe. With this example they keep changing value indefinitely.

Complete, minimal, self-contained example code that reproduces the issue

# cell 1
import panel as pn
pn.extension(inline=True)

# cell 2
inp1 = pn.widgets.IntInput()
inp1

# cell 3
inp1

# cell 4
for i in range(100):
    inp1.value = i
inp1.value

I have also been able to reproduce the issue while manually editing the value by rapidly clicking the up/down arrows when running jupyterlab over a network connection with some latency. If you are unable to reproduce, adding artificial latency between server and client may help.

Stack traceback and/or browser JavaScript console output

I restarted kernel and cleared the javascript console before running any cells, nothing relevant is printed while reproducing the bug:

VM1040:353 [bokeh 3.4.3] setting log level to: 'info'

Screenshots or screencasts of the bug in action

Run in local jupyterlab:
Screencast from 2024-09-26 15-15-13.webm

Run on a remote jupyterlab with more latency:
Screencast from 2024-09-26 15-54-00.webm

  • I may be interested in making a pull request to address this
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Sep 26, 2024
@philippjfr philippjfr added this to the v1.5.x milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

2 participants