Giter Club home page Giter Club logo

tensorboardcolab's People

Contributors

taomanwai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tensorboardcolab's Issues

Do not remove summary dir

get_ipython().system_raw('rm -Rf ' + graph_path)

Every time i rerun the setup, it removes all my saved summaries. While sometimes after a long run model, the ngrok connect breaks, so i have to rerun the tensorboardcolab, and hours of works are gone.

Of course i can always run ngrok http 6006 instead after the setup, but somehow i forget every time.

Issues with appending graphs

Hi all,

I am currently attempting to use Google Colab to graph some machine learning algorithms. Currently, whenever I create a model in the TensorBoard Scalar section I get two folders being the 'Training' and 'Validation' folders showing the data I need. However, when I run another model, the new data gets appended to those files as opposed to a new folder.

Is there a way to make unique named models that could be compared as opposed to appended to the same graph?

FailedPreconditionError when adding callback in Colab

Hi, when I add this callback to a simple Keras script in Colab I get the error:

FailedPreconditionError: Error while reading resource variable conv_dw_8_1/depthwise_kernel from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/conv_dw_8_1/depthwise_kernel/N10tensorflow3VarE does not exist.
[[Node: conv_dw_8_1/depthwise/ReadVariableOp = ReadVariableOpdtype=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
[[Node: metrics_1/acc/Mean/_99 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_6754_metrics_1/acc/Mean", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Any idea why?

AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'

/usr/local/lib/python3.6/dist-packages/tensorboardcolab/callbacks.py in set_model(self, model)
30 self.val_writer = tf.contrib.summary.create_file_writer(self.val_log_dir)
31 else:
---> 32 self.val_writer = tf.summary.FileWriter(self.val_log_dir)
33
34 super(TensorBoardColabCallback, self).set_model(model)

AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'

AttributeError: 'TensorBoardColabCallback' object has no attribute 'on_train_batch_begin'

Hello!
It seems that the latest 1.x version of Keras+Tensorflow requires an on_train_batch_begin function definition that is missing...

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-f2f738e2066b> in <module>()
      2 with session.as_default(), graph.as_default() :
      3   model.set_weights(weights)
----> 4   result = model.fit(X_train, y_train, batch_size=32, epochs=100, verbose=0, shuffle=False, validation_data=(X_test, y_test), callbacks=[PrintDots(),TensorBoardColabCallback(tbc)])
      5 end_time = time.perf_counter()
      6 print( "time = " + str(end_time - start_time) + "s" )

2 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/callbacks.py in _call_batch_hook(self, mode, hook, batch, logs)
    194     t_before_callbacks = time.time()
    195     for callback in self.callbacks:
--> 196       batch_hook = getattr(callback, hook_name)
    197       batch_hook(batch, logs)
    198     self._delta_ts[hook_name].append(time.time() - t_before_callbacks)

AttributeError: 'TensorBoardColabCallback' object has no attribute 'on_train_batch_begin'

These are the versions of Tensorflow, Keras and tensorboardcolab that I'm using, respectively, which already come pre-installed in Google Colab:

1.13.1
2.2.4-tf
Requirement already up-to-date: tensorboardcolab in /usr/local/lib/python3.6/dist-packages (0.0.22)

Any workaround for this issue?
Thanks!

not working in colab for tensorflow 2 - beta version

ImportError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/keras/callbacks.py in init(self, log_dir, histogram_freq, batch_size, write_graph, write_grads, write_images, embeddings_freq, embeddings_layer_names, embeddings_metadata, embeddings_data, update_freq)
744 import tensorflow as tf
--> 745 from tensorflow.contrib.tensorboard.plugins import projector
746 except ImportError:

4 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/init.py in ()
30 from tensorflow.contrib import cloud
---> 31 from tensorflow.contrib import cluster_resolver
32 from tensorflow.contrib import coder

/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/cluster_resolver/init.py in ()
25 from tensorflow.python.distribute.cluster_resolver.cluster_resolver import UnionClusterResolver
---> 26 from tensorflow.python.distribute.cluster_resolver.gce_cluster_resolver import GceClusterResolver
27 from tensorflow.python.distribute.cluster_resolver.kubernetes_cluster_resolver import KubernetesClusterResolver

ImportError: cannot import name 'GceClusterResolver'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)
in ()
17 epochs=5,
18 validation_data=(x_test, y_test),
---> 19 callbacks=[TensorBoardColabCallback(tbc)])

/usr/local/lib/python3.6/dist-packages/tensorboardcolab/callbacks.py in init(self, tbc, write_graph, **kwargs)
20
21 training_log_dir = os.path.join(log_dir, 'training')
---> 22 super(TensorBoardColabCallback, self).init(training_log_dir, **kwargs)
23
24 # Log the validation metrics to a separate subdirectory

/usr/local/lib/python3.6/dist-packages/keras/callbacks.py in init(self, log_dir, histogram_freq, batch_size, write_graph, write_grads, write_images, embeddings_freq, embeddings_layer_names, embeddings_metadata, embeddings_data, update_freq)
745 from tensorflow.contrib.tensorboard.plugins import projector
746 except ImportError:
--> 747 raise ImportError('You need the TensorFlow module installed to '
748 'use TensorBoard.')
749

ImportError: You need the TensorFlow module installed to use TensorBoard.

AttributeError: module 'tensorflow' has no attribute 'Summary'

I use pytorch with the following implementation:

from tensorboardcolab import TensorBoardColab
tb = TensorBoardColab()

and this call:

tb.save_value('Validation Accuracy', 'valid_acc',i, validation_acc)

Traceback gives me this error:

AttributeError                            Traceback (most recent call last)

<ipython-input-23-1106bec90267> in <module>()
      6 optimizer = optim.Adam(model.parameters(), lr=0.001, weight_decay=0.0001)
      7 training_epochs = 150
----> 8 metrics = train(model, train_loader, test_loader, loss, optimizer, training_epochs)
      9 
     10 summary(model, (3, 32,32))

1 frames

/usr/local/lib/python3.6/dist-packages/tensorboardcolab/core.py in save_value(self, graph_name, line_name, epoch, value)
     99                 tf.contrib.summary.scalar(graph_name, value)
    100         else:
--> 101             summary = tf.Summary()
    102             summary_value = summary.value.add()
    103             summary_value.simple_value = value

AttributeError: module 'tensorflow' has no attribute 'Summary'

Initialization failed; setup not passed

Something seems to be wrong with setup.
I attempted to run the tensorboardcolab tool in Colab as suggested in README,

!pip install -U tensorboardcolab
from tensorboardcolab import *
tbc=TensorBoardColab()

and got

(...)
Wait for 5 seconds...
Setup not passed, retry again (24)
(...)

Help Needed?

Hi,
I have run my code and the checkpoints and event files already created in the collab content drive. How can I run this specific event file in tensorborad in Collab?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.