tensorflow / tensorflow/tensorboard
Tensorboard Callback profile_batch causes Segmentation Fault
@nfelt is already working on this.
Since Jan 20, 2020.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
Environment information
Suggestion: Fix conflicting installations
Namely:
pip uninstall tensorboard tensorflow tensorflow-estimator tensorflow-gpu
pip install tensorflow # or tensorflow-gpu, or tf-nightly, ...
Issue description
System:
- Ubuntu 18.04
- TF2.0
Error:
I am using tf.keras and the model.fit() function to train my model. I have added the tf.keras.callbacks.TensorBoard callback to my .fit() call.
I am encountering an issue where if:
- profile_batch=2 --> Segmentation Fault (core dumped) when a call is made to
.fit() - profile_batch=0 --> No segfault (disabled profiling)
Note: This error only occurs sometimes; Run the model.fit() a couple of times to reproduce the error; This error happens independent of the directory being logged to
Background Info:
Currently, the input to my model is in the form of a tf.data.Dataset. The documentation for the callback says:
profile_batch: Profile the batch to sample compute characteristics. By default, it will profile the second batch. Set profile_batch=0 to disable profiling. Must run in TensorFlow eager mode.
I use the dataset.map() function in my input pipeline to transform my input data. However, since .map() does not execute eagerly, I wrap it around a tf.py_function, which should make it execute eagerly (I've verified that the map function does in fact run eagerly after using py_function).
However, sometimes, I still get a Segmentation Fault error, as described above. On the occasion where the Segmentation Fault does not occur, the profile logged to the Tensorboard is a .profile-empty file.
https://github.com/tensorflow/tensorboard/issues/2084 may be related.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.