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.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page