Releases: ilias-ant/tf-notify
0.3.0 🌬️
A custom callback for email (via SMTP) integration is introduced, called EmailCallback
:
import tensorflow as tf
from tf_notify import EmailCallback
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=[
EmailCallback(
to="[email protected]",
from_="[email protected]",
host="smtp.mail.yahoo.com",
port=465,
username="my-cool-username",
password="my-cool-password", # one-time app password
ssl=True,
)
],
)
Documentation:
The public atrributes for all available callbacks are now documented
0.2.0 ☀️
Instead of the very strict tensorflow = "~2.9.1"
required dependency, we now support all Tensorflow versions between v2.7.3
and v2.9.1
.
Additionally, CI matrix has been expanded:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
tf-version: ['2.7.3', '2.8.2', '2.9.1']
exclude:
- python-version: '3.10'
tf-version: '2.7.3'
in order to test any new code against the allowed Tensorflow versions as well (in combination with os
and python-version
). Note that any matrix combination that consists of the sub-combination (python-version, tf-version) = ('3.10', '2.7.3')
is excluded from the matrix, as support for python 3.10 has been introduced with tensorflow 2.8.
0.1.0 ⛰️
A custom callback for Telegram integration is introduced, called TelegramCallback
:
import tensorflow as tf
from tf_notify import TelegramCallback
# 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=[
TelegramCallback(token='XXXX:YYYY', chat_id=-1234)
], # send a Telegram notification when training ends!
)
0.1.0.beta1 🌊
This is the inaugural release of tf-notify
! 🎉🎉🎉
It is considered a beta release.
Features:
A custom callback for Slack integration is introduced, called SlackCallback
:
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!
)
Also, users are able to inspect the package version via:
import tf_notify
tf_notify.__version__
'0.1.0.beta1'
Documentation:
Project documentation is served in a continuous fashion over at https://tf-notify.readthedocs.io.
The following packages are utilized:
- mkdocs: Project documentation with Markdown
- mkdocs-material: A Material Design theme for MkDocs
- mkdocstrings: Automatic documentation from sources, for MkDocs.
To interact with the project's documentation locally, run:
mkdocs serve
inside a virtual environment.
CI/CD:
Continuous Integration and Continuous Delivery for the package is enabled through Github Actions.
For more details, see:
.github/workflows/ci.yml
.github/workflows/cd.yml