Tensorboard: Tensorflow has no attribute 'python'

Created on 12 Feb 2020  Â·  1Comment  Â·  Source: tensorflow/tensorboard

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

For browser-related issues, please additionally specify:

  • Browser type and version (e.g., Chrome 64.0.3282.140):
  • Screenshot, if it’s a visual issue:

Issue description

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)?

When I use profiler APIs:

# Context manager APIs
with tf.python.eager.profiler.Profiler('logdir_path'):
  # do your training here
  pass


# Function APIs
tf.python.eager.profiler.start()
# do your training here
profiler_result = tf.python.eager.profiler.stop()
tf.python.eager.profiler.save('logdir_path', profiler_result)

It comes with the error: tensorflow has no attribute 'python'

Most helpful comment

Please see https://github.com/tensorflow/tensorflow/issues/34823

Briefly-- the docs are mistaken in that the Profiler API is not currently exposed; updating both the API and the docs is in the works. In the meantime, please try this:

from tensorflow.python.eager import profiler
with profiler.Profiler('logdir_path'):
  pass

>All comments

Please see https://github.com/tensorflow/tensorflow/issues/34823

Briefly-- the docs are mistaken in that the Profiler API is not currently exposed; updating both the API and the docs is in the works. In the meantime, please try this:

from tensorflow.python.eager import profiler
with profiler.Profiler('logdir_path'):
  pass
Was this page helpful?
0 / 5 - 0 ratings