taomanwai / tensorboardcolab

A library make TensorBoard working in Colab Google
MIT License
149 stars 26 forks source link

AttributeError: 'TensorBoardColabCallback' object has no attribute 'is_eager_execution' #6

Closed simpleParadox closed 2 years ago

simpleParadox commented 5 years ago

The callbacks parameter for Keras is not taking inputs for TensorBoardColabCallback. @taomanwai https://colab.research.google.com/drive/19_QqEfi8WeNkbhRpxObukE8IggmMFJWY#scrollTo=UwtUJEjI51en

Please have a look or suggest a temporary solution.

taomanwai commented 5 years ago

Just fixed. Sorry for inconvenience caused

Please install latest version again by:

pip install -U tensorboardcolab

mrcmoresi commented 5 years ago

Dear @taomanwai i have the same issue but i cant fix it upgrading the package, here is the problem with the callbacks

Colab Notebook

simpleParadox commented 5 years ago

Hello, the issue has still not been fixed. The error till exists.

taomanwai commented 5 years ago

Well received

Will fix it ASAP

mariomeissner commented 5 years ago

Can confirm, I also have the same issue even after installing 0.0.21.

taomanwai commented 5 years ago

0.0.22 is available, & fully tested!

To ensure upgrade succeed, please:

  1. Restart colab server (to clear any cache mechanism)
  2. pip install -U tensorboardcolab
mariomeissner commented 5 years ago

Thank you, it works now! 😁

chanckjoseph commented 5 years ago

Applied !pip install -U tensorboardcolab. Still getting AttributeError: 'TensorBoardColabCallback' object has no attribute 'on_train_batch_begin'

yejilee-herings commented 5 years ago

Applied !pip install -U tensorboardcolab. Still getting AttributeError: 'TensorBoardColabCallback' object has no attribute 'on_train_batch_begin'

I am also getting the same error message.

virtualdvid commented 5 years ago

I got the same error even using !pip install -U --ignore-installed tensorboardcolab

paweljedrzejewski commented 5 years ago

I have the same issue. Do you guys know is there any way of using Tensor Board with Google Colab as a workaround?

virtualdvid commented 5 years ago

There is an alternative solution but we have to use TFv2.0 preview. So if you don't have problems with the migration try this:

install tfv2.0 for GPU or CPU (TPU no available yet)

CPU tf-nightly-2.0-preview GPU tf-nightly-gpu-2.0-preview

%%capture
!pip install -q tf-nightly-gpu-2.0-preview
# Load the TensorBoard notebook extension
%load_ext tensorboard.notebook

import TensorBoard as usual:

from tensorflow.keras.callbacks import TensorBoard

Clean or Create folder where to save the logs (run this lines before run the training fit())

# Clear any logs from previous runs
import time

!rm -R ./logs/ # rf
log_dir="logs/fit/{}".format(time.strftime("%Y%m%d-%H%M%S", time.gmtime()))
tensorboard = TensorBoard(log_dir=log_dir, histogram_freq=1)

Have fun with TensorBoard! :)

%tensorboard --logdir logs/fit

Here the official colab notebook and the repo on github

New TFv2.0 alpha release:

CPU !pip install -q tensorflow==2.0.0-alpha0 GPU !pip install -q tensorflow-gpu==2.0.0-alpha0

pankudo commented 5 years ago

Thank you. It works nicely 🥇

simpleParadox commented 2 years ago

Solved. Thanks!