tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.71k stars 1.66k forks source link

ALT+Scroll only scrolls the page but not the graph #5826

Open solismortis opened 2 years ago

solismortis commented 2 years ago

Environment information (required)

Diagnostics

Diagnostics output `````` --- check: autoidentify INFO: diagnose_tensorboard.py version e43767ef2b648d0d5d57c00f38ccbd38390e38da --- check: general INFO: sys.version_info: sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0) INFO: os.name: posix INFO: os.uname(): posix.uname_result(sysname='Linux', nodename='REDACTED', release='5.15.0-41-generic', version='#44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022', machine='x86_64') INFO: sys.getwindowsversion(): N/A --- check: package_management INFO: has conda-meta: True INFO: $VIRTUAL_ENV: None --- check: installed_packages INFO: installed: tensorboard==2.9.1 WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview'] WARNING: no installation among: ['tensorflow-estimator', 'tensorflow-estimator-2.0-preview', 'tf-estimator-nightly'] INFO: installed: tensorboard-data-server==0.6.1 --- check: tensorboard_python_version INFO: tensorboard.version.VERSION: '2.9.1' --- check: tensorflow_python_version Traceback (most recent call last): File "/home/mel/PycharmProjects/melanol_open_ai_gym/tensorboard_bug_reporting.py", line 522, in main suggestions.extend(check()) File "/home/mel/PycharmProjects/melanol_open_ai_gym/tensorboard_bug_reporting.py", line 75, in wrapper result = fn() File "/home/mel/PycharmProjects/melanol_open_ai_gym/tensorboard_bug_reporting.py", line 278, in tensorflow_python_version import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' --- check: tensorboard_data_server_version INFO: data server binary: '/home/mel/miniconda3/envs/dm_control_tripod/lib/python3.10/site-packages/tensorboard_data_server/bin/server' INFO: data server binary version: b'rustboard 0.6.1' --- check: tensorboard_binary_path INFO: which tensorboard: b'/home/mel/miniconda3/envs/dm_control_tripod/bin/tensorboard\n' --- check: addrinfos socket.has_ipv6 = True socket.AF_UNSPEC = socket.SOCK_STREAM = socket.AI_ADDRCONFIG = socket.AI_PASSIVE = Loopback flags: Loopback infos: [(, , 6, '', ('::1', 0, 0, 0)), (, , 6, '', ('127.0.0.1', 0))] Wildcard flags: Wildcard infos: [(, , 6, '', ('0.0.0.0', 0)), (, , 6, '', ('::', 0, 0, 0))] --- check: readable_fqdn INFO: socket.getfqdn(): 'REDACTED' --- check: stat_tensorboardinfo INFO: directory: /tmp/.tensorboard-info INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=1582479, st_dev=66309, st_nlink=2, st_uid=1000, st_gid=1000, st_size=4096, st_atime=1658940401, st_mtime=1658942416, st_ctime=1658942416) INFO: mode: 0o40777 --- check: source_trees_without_genfiles INFO: tensorboard_roots (1): ['/home/mel/miniconda3/envs/dm_control_tripod/lib/python3.10/site-packages']; bad_roots (0): [] --- check: full_pip_freeze INFO: pip freeze --all: -e git+https://github.com/abr/abr_control@5788c48f705dee83573513c96c9bf7174c18320c#egg=abr_control absl-py==1.1.0 alabaster==0.7.12 ale-py==0.7.4 alembic==1.8.1 arch==5.3.0 attrs==21.4.0 autopage==0.5.1 AutoROM==0.4.2 AutoROM.accept-rom-license==0.4.2 Babel==2.10.3 black==22.6.0 Bottleneck @ file:///opt/conda/conda-bld/bottleneck_1657175564434/work box2d-py==2.3.8 cachetools==5.2.0 certifi @ file:///opt/conda/conda-bld/certifi_1655968806487/work/certifi cffi @ file:///home/builder/ci_310/cffi_1642753365720/work chardet==4.0.0 charset-normalizer==2.1.0 click==8.1.3 cliff==3.10.1 cloudpickle==1.6.0 cmaes==0.8.2 cmd2==2.4.2 colorama==0.4.5 colorlog==6.6.0 coverage==6.4.2 cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work Cython==0.29.30 DataProperty==0.55.0 dm-control==1.0.3.post1 dm-env==1.5 dm-tree==0.1.7 docker-pycreds==0.4.0 docutils==0.17.1 execnet==1.9.0 fasteners==0.17.3 filelock==3.7.1 flake8==4.0.1 flake8-bugbear==22.7.1 fonttools==4.25.0 future @ file:///home/builder/ci_310/future_1640790123501/work gitdb==4.0.9 GitPython==3.1.27 glfw==2.5.3 google-auth==2.9.1 google-auth-oauthlib==0.4.6 greenlet==1.1.2 grpcio==1.47.0 gym==0.21.0 gym-minigrid==1.0.3 gym-notices==0.0.7 huggingface-hub==0.8.1 huggingface-sb3 @ git+https://github.com/huggingface/huggingface_sb3@25497f5e7f79855d5f94f5e01ecffc47f8a5051a idna==3.3 imageio==2.19.3 imagesize==1.4.1 importlab==0.7 importlib-resources==5.8.0 iniconfig==1.1.1 isort==5.10.1 Jinja2==3.1.2 joblib==1.1.0 kiwisolver @ file:///opt/conda/conda-bld/kiwisolver_1653292039266/work labmaze==1.0.5 libcst==0.4.7 livereload==2.6.3 lxml==4.9.1 lz4==4.0.1 Mako==1.2.1 Markdown==3.3.7 MarkupSafe==2.1.1 matplotlib @ file:///tmp/build/80754af9/matplotlib-suite_1647441664166/work mbstrdecoder==1.1.0 mccabe==0.6.1 mkl-fft==1.3.1 mkl-random @ file:///home/builder/ci_310/mkl_random_1641843545607/work mkl-service==2.4.0 mock==4.0.3 mpmath==1.2.1 mujoco==2.2.0 -e git+https://github.com/studywolf/mujoco-py.git@24b0324b33cf3c9468d94082e7579486e609dab7#egg=mujoco_py munkres==1.1.4 mypy-extensions==0.4.3 networkx==2.8.3 ninja==1.10.2.3 numexpr @ file:///opt/conda/conda-bld/numexpr_1656940300424/work numpy @ file:///opt/conda/conda-bld/numpy_and_numpy_base_1652801679809/work oauthlib==3.2.0 opencv-python==4.6.0.66 optuna==2.10.1 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work panda-gym==1.1.1 pandas==1.4.3 pathspec==0.9.0 pathtools==0.1.2 pathvalidate==2.5.0 patsy==0.5.2 pbr==5.9.0 Pillow==9.2.0 pip==22.1.2 platformdirs==2.5.2 plotly @ file:///tmp/abs_7afcdfad-dbbb-49d2-adea-186abf525c45jbnd8p95/croots/recipe/plotly_1658160053621/work pluggy==1.0.0 prettytable==3.3.0 promise==2.3 property-cached==1.6.4 protobuf==3.19.4 psutil==5.9.1 py==1.11.0 pyaml==21.10.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pybullet==3.2.5 pycodestyle==2.8.0 pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work pydot==1.4.2 pyenchant==3.2.2 pyflakes==2.4.0 pygame==2.1.0 pyglet==1.5.26 Pygments==2.12.0 PyOpenGL==3.1.6 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pyperclip==1.8.2 pytablewriter==0.64.2 pytest==7.1.2 pytest-cov==3.0.0 pytest-env==0.6.2 pytest-forked==1.4.0 pytest-xdist==2.5.0 python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work pytype==2022.7.18 pytz @ file:///opt/conda/conda-bld/pytz_1654762638606/work PyYAML==6.0 requests==2.28.1 requests-oauthlib==1.3.1 rliable==1.0.8 rsa==4.8 sb3-contrib==1.6.0 scikit-learn==1.1.1 scikit-optimize==0.9.0 scipy==1.8.1 seaborn @ file:///tmp/build/80754af9/seaborn_1629307859561/work sentry-sdk==1.7.2 setproctitle==1.2.3 setuptools==61.2.0 shortuuid==1.0.9 sip==4.19.13 six @ file:///tmp/build/80754af9/six_1644875935023/work smmap==5.0.0 snowballstemmer==2.2.0 Sphinx==5.0.2 sphinx-autobuild==2021.3.14 sphinx-autodoc-typehints==1.18.3 sphinx-copybutton==0.5.0 sphinx-rtd-theme==1.0.0 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphinxcontrib-spelling==7.6.0 SQLAlchemy==1.4.39 stable-baselines3==1.6.0 statsmodels==0.13.2 stevedore==4.0.0 sympy==1.10.1 tabledata==1.3.0 tabulate==0.8.10 tcolorpy==0.1.2 tenacity @ file:///tmp/abs_9ca5cd06-f53b-4ea6-8eea-954e11157fddo5mhurpp/croots/recipe/tenacity_1657899103026/work tensorboard==2.9.1 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 threadpoolctl==3.1.0 toml==0.10.2 tomli==2.0.1 torch==1.12.0 torchvision==0.13.0 tornado @ file:///home/builder/ci_310/tornado_1640795392144/work tqdm==4.64.0 typepy==1.3.0 typing-inspect==0.7.1 typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work urllib3==1.26.10 wandb==0.12.21 wasabi==0.9.1 wcwidth==0.2.5 Werkzeug==2.1.2 wheel==0.37.1 ``````

Chrome 103.0.5060.114 (Official Build) (64-bit)

Peek 2022-07-27 22-32

Issue description

ALT+Scroll only scrolls the page for me. Same for scalars and time series. If I try this in Opera Version:89.0.4447.51, it opens the menu instead, same for Firefox.

qihach64 commented 2 years ago

Hi @Melanol thanks for reaching out.

I'm having trouble reproducing the error as ALT+Scroll works fine for me in both my linux machine and macbook pro with tensorboard 2.9.1 .

Could you try

$ virtualenv -p python3 tf
$ source tf/bin/activate
(tf)$ pip install --upgrade pip
(tf)$ pip install tf-nightly -r tensorboard/pip_package/requirements.txt -r tensorboard/pip_package/requirements_dev.txt

as mentioned in https://github.com/tensorflow/tensorboard/blob/master/DEVELOPMENT.md#how-to-develop-tensorboard to run tensorboard under a clean virutalenv ? I wonder if it might be due to some weird dependency issue that caused the problem.

Also if you're a mac user or you're using virtual machine(or some remote desktop) via Mac sometimes the ALT key mapping can be weird so might be worth checking that you're pressing the "right" ALT key.

solismortis commented 2 years ago

@qihach64 I get ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'tensorboard/pip_package/requirements.txt'.

I am in Ubuntu.

qihach64 commented 2 years ago

So you need to:

  1. Download the tensorboard git clone git@github.com:tensorflow/tensorboard.git
  2. Cd into the source code folder you just downloaded cd [path/to/tensorboard]
  3. run the above cmd in https://github.com/tensorflow/tensorboard/blob/master/DEVELOPMENT.md#how-to-develop-tensorboard to install the dependencies in a fresh new virtualenv
  4. build Tensorboard from the source code and run it (tf)$ bazel run //tensorboard -- --logdir /path/to/logs
solismortis commented 2 years ago

Too much trouble. I just wanted to report that such bug exists.

qihach64 commented 2 years ago

Sure, no worries, I will try to reproduce the same error given the debugging info you provided. Thanks!

qihach64 commented 2 years ago

One last question, could you try other key such that holding it & using scroll wheel works as expected? Just want to make sure it's not the key mapping that caused the issue. thx!

solismortis commented 2 years ago

Holding CTRL and scrolling zooms the page.

solismortis commented 2 years ago

I mean, if it happens that often, maybe tensorboard needs buttons for this.

bmd3k commented 2 years ago

Hi @Melanol , thanks for the report.

Our check for whether you are pressing the ALT key is very simple. We only check if the WheelEvent includes the altKey property set to true: https://cs.opensource.google/tensorflow/tensorboard/+/master:tensorboard/components/vz_line_chart2/panZoomDragLayer.ts;l=104;drc=367839f30de3968eff5fecb8b38e1d5782434b6b

In order to help troubleshoot, could you please try out this jsfiddle: https://jsfiddle.net/ebrf64pc/1/

When you get it to run, press ALT key and click the "HOLD ALT AND CLICK ME" button. Does it output "You were holding ALT" in the box beside the button?

solismortis commented 2 years ago

@bmd3k It says "You were holding ALT".

bmd3k commented 2 years ago

Would you also mind opening the "Time Series" tab (at the top), finding a scalar chart there, and seeing if you can successfully ALT+scroll to zoom?

solismortis commented 2 years ago

@bmd3k Same behavior.

bmd3k commented 2 years ago

Mysterious.

Unfortunately, since none of us can reproduce this, we won't be able to debug much further. If you have the time to debug further and try to identify a root cause, that would be great. I recognize, though, that it might be more effort than it is worth.

I agree with your sentiment that "if it happens that often, maybe tensorboard needs buttons for this." I will leave this issue open in case any other users want to chime in saying they have encountered the same problem. If we get a few similar reports and we determine a root cause then we can consider adding another affordance for zooming.