tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.68k stars 1.65k forks source link

Not able to capture profile from Tensorboard profile tab #4954

Closed srihari-humbarwadi closed 3 years ago

srihari-humbarwadi commented 3 years ago

Environment information (required)

Please run diagnose_tensorboard.py (link below) in the same environment from which you normally run TensorFlow/TensorBoard, and paste the output here:

Diagnostics

Diagnostics output `````` --- check: autoidentify INFO: diagnose_tensorboard.py version e43767ef2b648d0d5d57c00f38ccbd38390e38da --- check: general INFO: sys.version_info: sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0) INFO: os.name: posix INFO: os.uname(): posix.uname_result(sysname='Linux', nodename='tpu-vm', release='4.19.0-16-cloud-amd64', version='#1 SMP Debian 4.19.181-1 (2021-03-19)', machine='x86_64') INFO: sys.getwindowsversion(): N/A --- check: package_management INFO: has conda-meta: False INFO: $VIRTUAL_ENV: None --- check: installed_packages INFO: installed: tb-nightly==2.6.0a20210510 WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview'] INFO: installed: tf-estimator-nightly==2.6.0.dev2021050801 INFO: installed: tensorboard-data-server==0.6.1 --- check: tensorboard_python_version INFO: tensorboard.version.VERSION: '2.6.0a20210510' --- check: tensorflow_python_version INFO: tensorflow.__version__: '2.6.0-dev20210508' INFO: tensorflow.__git_version__: 'v1.12.1-56286-g87b7ef343d0' --- check: tensorboard_data_server_version INFO: data server binary: '/usr/local/lib/python3.7/dist-packages/tensorboard_data_server/bin/server' INFO: data server binary version: b'rustboard 0.6.1' --- check: tensorboard_binary_path INFO: which tensorboard: b'/usr/local/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(): 'tpu-vm.europe-west4-a.c.deep-learning-248814.internal' --- check: stat_tensorboardinfo INFO: directory: /tmp/.tensorboard-info INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=1442048, st_dev=2049, st_nlink=2, st_uid=1000, st_gid=1001, st_size=4096, st_atime=1620495136, st_mtime=1620681893, st_ctime=1620681893) INFO: mode: 0o40777 --- check: source_trees_without_genfiles INFO: tensorboard_roots (1): ['/usr/local/lib/python3.7/dist-packages']; bad_roots (0): [] --- check: full_pip_freeze INFO: pip freeze --all: absl-py==0.12.0 appdirs==1.4.4 argon2-cffi==20.1.0 astunparse==1.6.3 async-generator==1.10 attrs==21.2.0 backcall==0.2.0 bleach==3.3.0 cached-property==1.5.2 cachetools==4.2.2 certifi==2020.12.5 cffi==1.14.5 chardet==4.0.0 cloud-tpu-client==0.10 cloud-tpu-profiler==2.3.0 crcmod==1.7 cycler==0.10.0 Cython==0.29.23 decorator==5.0.7 defusedxml==0.7.1 dill==0.3.3 distlib==0.3.1 distro-info==0.21 dm-tree==0.1.6 easydict==1.9 entrypoints==0.3 filelock==3.0.12 flatbuffers==1.12 future==0.18.2 gast==0.4.0 gin-config==0.4.0 google-api-core==1.26.3 google-api-python-client==1.8.0 google-auth==1.30.0 google-auth-httplib2==0.1.0 google-auth-oauthlib==0.4.4 google-cloud-bigquery==2.16.0 google-cloud-core==1.6.0 google-crc32c==1.1.2 google-pasta==0.2.0 google-resumable-media==1.2.0 googleapis-common-protos==1.53.0 grpcio==1.37.1 gviz-api==1.9.0 h5py==3.1.0 httplib2==0.19.1 idna==2.10 importlib-metadata==4.0.1 importlib-resources==5.1.2 ipykernel==5.5.4 ipython==7.23.1 ipython-genutils==0.2.0 ipywidgets==7.6.3 jedi==0.18.0 Jinja2==2.11.3 joblib==1.0.1 jsonschema==3.2.0 jupyter==1.0.0 jupyter-client==6.1.12 jupyter-console==6.4.0 jupyter-core==4.7.1 jupyterlab-pygments==0.1.2 jupyterlab-widgets==1.0.0 kaggle==1.5.12 keras-nightly==2.6.0.dev2021050600 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 lingvo==0.8.2 Markdown==3.3.4 MarkupSafe==1.1.1 matplotlib==3.4.2 matplotlib-inline==0.1.2 mistune==0.8.4 model-pruning-google-research==0.0.5 mpmath==1.2.1 nbclient==0.5.3 nbconvert==6.0.7 nbformat==5.1.3 nest-asyncio==1.5.1 notebook==6.3.0 numpy==1.19.5 oauth2client==4.1.3 oauthlib==3.1.0 opencv-python-headless==4.5.2.52 opt-einsum==3.3.0 packaging==20.9 pandas==1.2.4 pandocfilters==1.4.3 parso==0.8.2 pexpect==4.8.0 pickleshare==0.7.5 Pillow==8.2.0 pip==21.1.1 portalocker==2.0.0 prometheus-client==0.10.1 promise==2.3 prompt-toolkit==3.0.18 proto-plus==1.18.1 protobuf==3.16.0 psutil==5.8.0 ptyprocess==0.7.0 py-cpuinfo==8.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycocotools==2.0.2 pycparser==2.20 pycurl==7.43.0.2 Pygments==2.9.0 PyGObject==3.30.4 pyparsing==2.4.7 pyrsistent==0.17.3 python-apt==1.8.4.3 python-dateutil==2.8.1 python-slugify==5.0.2 pytz==2021.1 PyYAML==5.4.1 pyzmq==22.0.3 qtconsole==5.1.0 QtPy==1.9.0 requests==2.25.1 requests-oauthlib==1.3.0 rsa==4.7.2 sacrebleu==1.5.1 scikit-learn==0.24.2 scipy==1.6.3 Send2Trash==1.5.0 sentencepiece==0.1.95 seqeval==1.2.2 setuptools==56.1.0 six==1.16.0 sympy==1.8 tb-nightly==2.6.0a20210510 tbp-nightly==2.5.0a20210428 tensor2tensor==1.15.7 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.0 tensorflow-addons==0.12.1 tensorflow-datasets==4.3.0 tensorflow-hub==0.12.0 tensorflow-metadata==0.30.0 tensorflow-model-optimization==0.5.0 tensorflow-serving-api==1.15.0rc2 termcolor==1.1.0 terminado==0.9.4 testpath==0.4.4 text-unidecode==1.3 tf-estimator-nightly==2.6.0.dev2021050801 tf-nightly-cpu==2.6.0.dev20210508 tf-slim==1.1.0 threadpoolctl==2.1.0 tornado==6.1 tqdm==4.60.0 traitlets==5.0.5 typeguard==2.12.0 typing-extensions==3.10.0.0 unattended-upgrades==0.1 uritemplate==3.0.1 urllib3==1.26.4 virtualenv==20.4.6 waymo-open-dataset-tf-2-1-0==1.3.0 wcwidth==0.2.5 webencodings==0.5.1 Werkzeug==1.0.1 wheel==0.36.2 widgetsnbextension==3.5.1 wrapt==1.12.1 zipp==3.4.1 ``````

For browser-related issues, please additionally specify:

Issue description

This issue happens with 2.4.1, 2.5.0 and also the nightly builds. I am not able to capture the profile from Tensorboard. I have attached my screen capture below tensorboard

This is the error log from chrome console

core.js:4442 ERROR Error: It looks like your application or one of its dependencies is using i18n.
Angular 9 introduced a global `$localize()` function that needs to be loaded.
Please run `ng add @angular/localize` from the Angular CLI.
(For non-CLI projects, add `import '@angular/localize/init';` to your `polyfills.ts` file.
For server-side rendering applications add the import to your `main.server.ts` file.)
    at _global$1.$localize (core.js:31865)
    at consts (capture_profile_dialog.mjs:67)
    at createTView (core.js:7600)
    at getOrCreateTComponentView (core.js:7575)
    at createRootComponentView (core.js:13525)
    at ComponentFactory$1.create (core.js:24067)
    at ViewContainerRef.createComponent (core.js:10205)
    at CdkPortalOutlet.attachComponentPortal (portal.js:515)
    at MatDialogContainer.attachComponentPortal (dialog.js:169)
    at MatDialog._attachDialogContent (dialog.js:728)
defaultErrorLogger @ core.js:4442
handleError @ core.js:4490
handleError @ core.js:8829
executeListenerWithErrorHandling @ core.js:15282
wrapListenerIn_markDirtyAndPreventDefault @ core.js:15314
(anonymous) @ platform-browser.js:582
ZoneDelegate.invokeTask @ zone.js:421
onInvokeTask @ core.js:27546
ZoneDelegate.invokeTask @ zone.js:420
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:503
invokeTask @ zone.js:1671
globalZoneAwareCallback @ zone.js:1697
core.js:4442 ERROR TypeError: Cannot read property 'focusInitialElementWhenReady' of undefined
    at MatDialogContainer._trapFocus (dialog.js:196)
    at MatDialogContainer._onAnimationDone (dialog.js:301)
    at MatDialogContainer_animation_dialogContainer_done_HostBindingHandler (dialog.js:328)
    at executeListenerWithErrorHandling (core.js:15279)
    at wrapListenerIn_markDirtyAndPreventDefault (core.js:15314)
    at animations.js:188
    at ZoneDelegate.invoke (zone.js:386)
    at Object.onInvoke (core.js:27558)
    at ZoneDelegate.invoke (zone.js:385)
    at Zone.run (zone.js:143)
defaultErrorLogger @ core.js:4442
handleError @ core.js:4490
handleError @ core.js:8829
executeListenerWithErrorHandling @ core.js:15282
wrapListenerIn_markDirtyAndPreventDefault @ core.js:15314
(anonymous) @ animations.js:188
ZoneDelegate.invoke @ zone.js:386
onInvoke @ core.js:27558
ZoneDelegate.invoke @ zone.js:385
Zone.run @ zone.js:143
run @ core.js:27440
scheduleListenerCallback @ animations.js:188
(anonymous) @ animations.js:343
(anonymous) @ browser.js:86
(anonymous) @ browser.js:86
(anonymous) @ browser.js:4464
_onFinish @ browser.js:4464
(anonymous) @ browser.js:4480
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:503
invokeTask @ zone.js:1671
globalZoneAwareCallback @ zone.js:1697
psybuzz commented 3 years ago

Thanks for the report, this seems specific to the profiler plugin.

@yisitu we recently saw this same symptom in TensorBoard core https://github.com/tensorflow/tensorboard/pull/4937. I think the fix is to modify the profiler's frontend code with the localize import: https://github.com/tensorflow/profiler/blob/master/frontend/main.ts

srihari-humbarwadi commented 3 years ago

thank you! works with tbp-nightly now

yisitu commented 3 years ago

You are welcome!