Skip to main content

A Keras Callback that uploads your Tensorboard logs to a Cloud Bucket

Project description

Keras Bucket Tensorboard Callback

License: MIT PyPI version Maintainability Test Coverage

A Keras Callback that uploads your Tensorboard logs to a Cloud Bucket

Currently, only Google Cloud Platform Storage is supported. Very little effort is needed to support AWS S3, so feel free to contribute to this project.

Installation

pip install keras-bucket-tensorboard-callback

Basic usage

The following example trains uploads the Tensorboard logs to you GCP Storage bucket my-bucket, inside the directory any_dir:

# Import the class
from keras_bucket_tensorboard_callback import BucketTensorBoard

# Create the callback instance, passing the bucket URI
bucket_callback = BucketTensorBoard('gs://my-bucket/any_dir')

# Train the model with the callback
model.fit(
    x=X,
    y=Y,
    epochs=20,
    callbacks=[bucket_callback]
)

Make sure you have access to the provided bucket. For GCP, you should have the GOOGLE_APPLICATION_CREDENTIALS env set, pointing to your json key file.

Viewing the results on TensorBoard

With tensorboard installed your environment, run:

tensorboard --logdir=gs://my-bucket/any_dir

The TensorBoard will show your metrics and graphs saved on the bucket.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for keras-bucket-tensorboard-callback, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size keras_bucket_tensorboard_callback-1.0.4-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size keras-bucket-tensorboard-callback-1.0.4.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page