Open pritamdodeja opened 1 year ago
Hi,
I retried my experiment and I actually did a slightly different thing -- I installed tensorflow==1.12.0rc0
(which brought tensorboard==1.12.0
) and then tensorboard-plugin-profile==2.11.1
, and finally downgraded to protobuf==3.20.3
. This allows me to open profile runs created by both TF 1.11 and TF 1.12.0rc0.
I'm running into the same issue. The workaround suggested by @foxik didn't work for me either. Are there any suggestions for other workarounds? Profiling is currently not possible for our model; Trying to figure out which custom layer is causing the issue is not feasible.
@JustASquid do you have the flexibility to run on a slightly older versions of tf*? I was able to get this to work by doing that. I can share my config with you later today in case that's a viable option.
@pritamdodeja I did a run in version 2.10, I no longer get this warning, but the training step markers are wrong:
This run was with profile_batch="10,20"
with a 30-batch epoch.
Could this be related to the same issue?
@pritamdodeja I did a run in version 2.10, I no longer get this warning, but the training step markers are wrong:
This run was with
profile_batch="10,20"
with a 30-batch epoch.Could this be related to the same issue?
@JustASquid the original symptom I faced was profiler wasn't available with the message related to the step markers in the screenshot above. Do you see that the profiler is available to you in tensorboard? Try running the reproducible example I have put as a snippet above and see what results you get.
@pritamdodeja to clarify, the warning doesn't show up anymore when downgrading from Tensorflow 2.11 to Tensorflow 2.10 for the training run.
But the issue now is that the step numbers are all wrong; As you can see from the x-axis which shows incorrect step numbers and the very strange "spiking". Could be related to #266 perhaps?
@JustASquid It looks like the same issue to me. I don't know enough protocol buffers yet to be able to effectively debug it though. If/when that changes, I will post back here with an update.
@JustASquid I just tested this issue on the following configuration and it's still broken. Things are actually worse now as you cannot go back to an older tf version because of cudnn dependency :( - Profiler no longer shows up. If I get the time, I'm going to do a deep dive on tensorboard profiler and protocol buffers. I'm using the latest protobuf but setting
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
$ pip freeze | grep tensor
tensorboard==2.14.0
tensorboard-data-server==0.7.1
tensorboard-plugin-profile==2.13.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.13.0
tensorflow-data-validation==1.13.0
tensorflow-estimator==2.13.0
tensorflow-hub==0.12.0
tensorflow-io-gcs-filesystem==0.33.0
tensorflow-metadata==1.13.1
tensorflow-model-analysis==0.44.0
tensorflow-serving-api==2.12.2
tensorflow-transform==1.13.0
I was able to understand why this is happening. The profiler is writing the profiler data in a different place in the hierarchy. Once that issue is solved, and the profile duration is long enough, for me, the step marker issue is going away. I will provide details in the next day or so.
@JustASquid @foxik Here is my understanding of the possible cause of this:
Let's say you usually run tensorboard --logdir model_run
to start tensorboard
tensorboard expects plugins/profile to exist in model_run/<run number>/<train|validation>
Starting with tensorflow 2.12 (possibly earlier) plugins/profile is instead appearing at model_run/<run number>
This is causing tensorboard to not see the profile data, and not activating the profiler in the UI, etc. Once you manually rectify this by copying the data using
cp -Rpv ../plugins .
in model_run/<run number>/<train|validation>
and refresh tensorboard, it should start seeing the profiler.
If I had to guess what introduced the change/error, I would say it's somewhere in the vicinity of
tensorflow/tensorflow/core/profiler/convert/xplane_to_tools_data.cc
More specifically, in the tensorflow repo, I suspect the following might be helpful to figure out what exactly broke this
git diff 7a500e 4d4873 tensorflow/tensorflow/core/profiler/convert/xplane_to_tools_data.h
My use-case is in the context of a tfx pipeline, but I believe this applies to other use cases where profiling is happening, so likely your log_dir
and hierarchy might be different, but relatively, the problem should be the same.
Hello,
Thanks for raising and discussing the issue. I am facing the same issue. Could you tell me if this is resolved?
Thanks.
In my case I am able to obtain stats for example code similar to what @pritamdodeja has provided above, but not when I change to my own loss function that I am trying to debug (and this runs okay). I get the impression the core profiler is not outputting those markers, as they don't appear to be in the protobuf file, so have opened here.
Consider Stack Overflow for getting support using TensorBoard—they have a larger community with better searchability:
https://stackoverflow.com/questions/tagged/tensorboard
Do not use this template for for setup, installation, or configuration issues. Instead, use the “installation problem” issue template:
https://github.com/tensorflow/tensorboard/issues/new?template=installation_problem.md
To report a problem with TensorBoard itself, please fill out the remainder of this template.
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:https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
Diagnostics
Diagnostics output
`````` --- check: autoidentify INFO: diagnose_tensorboard.py version 516a2f9433ba4f9c3a4fdb0f89735870eda054a1 --- check: general INFO: sys.version_info: sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0) INFO: os.name: posix INFO: os.uname(): posix.uname_result(sysname='Linux', nodename='71d6fe811d18', release='6.0.5-200.fc36.x86_64', version='#1 SMP PREEMPT_DYNAMIC Wed Oct 26 15:55:21 UTC 2022', 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: tensorboard==2.11.0 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: tensorflow-estimator==2.11.0 INFO: installed: tensorboard-data-server==0.6.1 --- check: tensorboard_python_version INFO: tensorboard.version.VERSION: '2.11.0' --- check: tensorflow_python_version INFO: tensorflow.__version__: '2.11.0' INFO: tensorflow.__git_version__: 'v2.11.0-rc2-17-gd5b57ca93e5' --- check: tensorboard_data_server_version INFO: data server binary: '/usr/local/lib/python3.8/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 =Next steps
No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.
~
For browser-related issues, please additionally specify:
Issue description
Running very standard example of tensorboard callback, code below, and getting No step marker observed issue
Please describe the bug as clearly as possible. How can we reproduce the problem without additional resources (including external data files and proprietary Python modules)?
Step markers are either not getting logged by Keras or are not being read by tensorboard. I would expect that this information is logged so that I can use the module for optimizing tf.data usage. The environment that this is run in is a standard tensorflow docker container with the only additional package installed being tensorboard_plugin_profile
@foxik has suggested this is a protobuf version issue and that upgrading to 3.20.3 fixed a similar issue for him. It didn't fix it for me, am attaching the logs from both versions pre and post upgrade. I originally opened the issue at https://github.com/tensorflow/tensorboard/issues/6210 - @bmd3k asked me to recreate it here with all the information consolidated.
logs.oldprotobuf 2.zip
logs.protobuf.3.20.3.zip