Jupyter Extension version (available under the Extensions sidebar): v2024.3.1
Python Extension version (available under the Extensions sidebar): v2024.4.1
OS (Windows | Mac | Linux distro) and version: ubuntu22.04
Python and/or Anaconda version: Python 3.11.5
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): docker container
Jupyter server running: Local | Remote | N/A : NA, ssh login in
Expected behaviour
The refresher is set to update every 30 seconds. However, the refresher cannot pick up the new log/graph/profile after the tensorboard plugin is launched. The tensorboard running independently and outside vscode can get all updates.
Actual behaviour
The refresher tried to update ( the turning around arrow moves) but the logs etc after the lauching keep missing.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
test code to get graph/profile for a tf.function:
import tensorflow as tf, numpy as np
@tf.function
def my_func(x):
y = x * x
z = tf.sqrt(y)
return z
x = tf.constant([1., 2., 3.])
y = my_func(x)
writer = tf.summary.create_file_writer('/home/sharedspace/test/log')
with writer.as_default():
tf.keras.backend.set_learning_phase(0) # Make sure we're in evaluation mode
tf.summary.trace_on(graph=True, profiler=True)
y = my_func(x)
tf.summary.trace_export('my_func_graph',profiler_outdir='/home/sharedspace/test/log', step=0) #, profile_timeline=False
Environment data
Expected behaviour
The refresher is set to update every 30 seconds. However, the refresher cannot pick up the new log/graph/profile after the tensorboard plugin is launched. The tensorboard running independently and outside vscode can get all updates.
Actual behaviour
The refresher tried to update ( the turning around arrow moves) but the logs etc after the lauching keep missing.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
import tensorflow as tf, numpy as np
@tf.function def my_func(x): y = x * x z = tf.sqrt(y) return z x = tf.constant([1., 2., 3.]) y = my_func(x)
writer = tf.summary.create_file_writer('/home/sharedspace/test/log') with writer.as_default(): tf.keras.backend.set_learning_phase(0) # Make sure we're in evaluation mode tf.summary.trace_on(graph=True, profiler=True) y = my_func(x) tf.summary.trace_export('my_func_graph',profiler_outdir='/home/sharedspace/test/log', step=0) #, profile_timeline=False
!tensorboard --logdir "/home/sharedspace/test/log" --bind_all
no need above. from now on use vscode's Tensorboard plugin <-- navigate to the folder if not current folder
In a new cell call the following magic, or ctrl+shift+p to select Python: Launch TensorBoard
%load_ext tensorboard