Metadata-Version: 2.1
Name: tf-notify
Version: 0.1.0b1
Summary: Want to get notified on the progress of your Tensorflow model training? Enter, a Tensorflow Keras callback to send notifications on the messaging app of your choice.
Home-page: https://pypi.org/project/tf-notify
License: Apache-2.0 license
Keywords: tensorflow,keras,callback,notifications,slack
Author: Ilias Antonopoulos
Author-email: ilias.antonopoulos@yahoo.gr
Requires-Python: >=3.7,<3.11
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: Other/Proprietary License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: notifiers (>=1.3.3,<1.4.0)
Requires-Dist: tensorflow (>=2.9.1,<2.10.0)
Project-URL: Bug Tracker, https://github.com/ilias-ant/tf-notify/issues
Project-URL: Documentation, https://tf-notify.readthedocs.io
Project-URL: Repository, https://github.com/ilias-ant/tf-notify
Description-Content-Type: text/markdown

# tf-notify

[![PyPI](https://img.shields.io/pypi/v/tf-notify?color=blue&label=PyPI&logo=PyPI&logoColor=white)](https://pypi.org/project/tf-notify/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tf-notify?logo=python&logoColor=white)](https://www.python.org/) [![codecov](https://codecov.io/gh/ilias-ant/tf-notify/branch/main/graph/badge.svg?token=2H0VB8I8IH)](https://codecov.io/gh/ilias-ant/tf-notify) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ilias-ant/tf-notify/CI)](https://github.com/ilias-ant/tf-notify/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/tf-notify/badge/?version=latest)](https://tf-notify.readthedocs.io/en/latest/?badge=latest)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/tf-notify?color=orange)](https://www.python.org/dev/peps/pep-0427/)

> Want to get notified on the progress of your Tensorflow model training?

This package provides a [tf.keras](https://www.tensorflow.org/api_docs/python/tf/keras/callbacks/Callback) callback to send notifications to a messaging app of your choice.

## Install

The recommended installation is via `pip`:

```bash
pip install tf-notify
```

## Supported Apps

The following apps are currently supported. But, do check the project frequently, as many more will soon be supported!

<table>
  <tr>
    <td>
      <img src="https://raw.githubusercontent.com/ilias-ant/tf-notify/main/static/logos/slack.png" height="128" width="128" style="max-height: 128px; max-width: 128px;"><a href="https://tf-notify.readthedocs.io/en/latest/api/#tf_notify.callbacks.slack.SlackCallback">Slack</a>
    </td>
  </tr>
</table>

## Usage

```python
import tensorflow as tf
from tf_notify import SlackCallback


# define the tf.keras model to add callbacks to
model = tf.keras.Sequential(name='neural-network')
model.add(tf.keras.layers.Dense(1, input_dim=784))
model.compile(
    optimizer=tf.keras.optimizers.RMSprop(learning_rate=0.1),
    loss="mean_squared_error",
    metrics=["mean_absolute_error"],
)

model.fit(
    x_train,
    y_train,
    batch_size=128,
    epochs=2,
    verbose=0,
    validation_split=0.5,
    callbacks=[
        SlackCallback(webhook_url='https://url.to/webhook')
    ],  # send a Slack notification when training ends!
)
```

You should see something like this on your Slack:

<img src="https://raw.githubusercontent.com/ilias-ant/tf-notify/main/static/slack_notification_example.png" width="50%" text="https://www.researchgate.net/figure/Sample-images-from-MURA-dataset_fig2_348282230">



## How to contribute

If you wish to contribute, [this](CONTRIBUTING.md) is a great place to start!

## License

Distributed under the [Apache-2.0 license](LICENSE).
