tf-training-notifier


Nametf-training-notifier JSON
Version 1.0.3 PyPI version JSON
download
home_page
SummarySends telegram messages informing user about ML training job progress.
upload_time2022-12-31 01:09:40
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2022 Bart Gebka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords tensorflow machine learning notifier monitor callback
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tensorflow Training Notifier

A python package which periodically notifies you of your Tensorflow job's progress. 

## Installation

The python package can be installed via pip.

```bash
pip install tf-training-notifier
```

## Setup

The package relies on two envionrmnet variables ("TRAINING_NOTIFIER_TOKEN" and "TRAINING_NOTIFIER_CHAT_ID") being set. These variables point towards the Telegram bot token and the Telegram chat ID. Instructions on how to get and set those up can be found [here](https://bart1259.github.io/tf-training-notifier/).

## Usage

### Setting up the notifier

```python
import trainingnotifier
EPOCHS = 15
# The default notifier which only notifies the user when the job is completed.
notifier = trainingnotifier.NotifierCallback(EPOCHS)
model.fit(x_train, y_train, epochs=EPOCHS, callbacks=[notifier])
```

```python
# Creates a notifier that will update the user ONCE (if the job takes more than 2 minutes) 
#  when the job is done. It will also report the loss in this message.
notifier = trainingnotifier.NotifierCallback(EPOCHS, min_time="2m", metrics=["loss"])
```

```python
# Creates a new notifier that will notify the user, at soonest, every 10 minutes with 
#  the jobs ETA and loss values. If the job takes longer than 10 minutes than it will send 
#  a notification that the job is done
notifier = trainingnotifier.NotifierCallback(EPOCHS, epoch_updates=True, min_time="10m", metrics=["loss"])
```

### To test if the system was setup properly.

```python
# This function tests the notification system. If the target user recieves a Telegram test 
#  message, then the enviornment variables have been set correctly.
trainingnotifier.test_notifier()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tf-training-notifier",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "tensorflow,machine learning,notifier,monitor,callback",
    "author": "",
    "author_email": "Bart Gebka <bartg1259@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b0/50/a5e55e6d3c896c839fee0ae5d4443291d89d3ea5bd216ebb2d58b7962655/tf-training-notifier-1.0.3.tar.gz",
    "platform": null,
    "description": "# Tensorflow Training Notifier\r\n\r\nA python package which periodically notifies you of your Tensorflow job's progress. \r\n\r\n## Installation\r\n\r\nThe python package can be installed via pip.\r\n\r\n```bash\r\npip install tf-training-notifier\r\n```\r\n\r\n## Setup\r\n\r\nThe package relies on two envionrmnet variables (\"TRAINING_NOTIFIER_TOKEN\" and \"TRAINING_NOTIFIER_CHAT_ID\") being set. These variables point towards the Telegram bot token and the Telegram chat ID. Instructions on how to get and set those up can be found [here](https://bart1259.github.io/tf-training-notifier/).\r\n\r\n## Usage\r\n\r\n### Setting up the notifier\r\n\r\n```python\r\nimport trainingnotifier\r\nEPOCHS = 15\r\n# The default notifier which only notifies the user when the job is completed.\r\nnotifier = trainingnotifier.NotifierCallback(EPOCHS)\r\nmodel.fit(x_train, y_train, epochs=EPOCHS, callbacks=[notifier])\r\n```\r\n\r\n```python\r\n# Creates a notifier that will update the user ONCE (if the job takes more than 2 minutes) \r\n#  when the job is done. It will also report the loss in this message.\r\nnotifier = trainingnotifier.NotifierCallback(EPOCHS, min_time=\"2m\", metrics=[\"loss\"])\r\n```\r\n\r\n```python\r\n# Creates a new notifier that will notify the user, at soonest, every 10 minutes with \r\n#  the jobs ETA and loss values. If the job takes longer than 10 minutes than it will send \r\n#  a notification that the job is done\r\nnotifier = trainingnotifier.NotifierCallback(EPOCHS, epoch_updates=True, min_time=\"10m\", metrics=[\"loss\"])\r\n```\r\n\r\n### To test if the system was setup properly.\r\n\r\n```python\r\n# This function tests the notification system. If the target user recieves a Telegram test \r\n#  message, then the enviornment variables have been set correctly.\r\ntrainingnotifier.test_notifier()\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Bart Gebka  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Sends telegram messages informing user about ML training job progress.",
    "version": "1.0.3",
    "split_keywords": [
        "tensorflow",
        "machine learning",
        "notifier",
        "monitor",
        "callback"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "9b0523be1a3acf6935ac72995d15154a",
                "sha256": "13b793a576a580ebbd9e646aaf5bac32eca02e34b5f6edc8ca592098c8aa1d53"
            },
            "downloads": -1,
            "filename": "tf_training_notifier-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b0523be1a3acf6935ac72995d15154a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6600,
            "upload_time": "2022-12-31T01:09:36",
            "upload_time_iso_8601": "2022-12-31T01:09:36.394605Z",
            "url": "https://files.pythonhosted.org/packages/37/a1/1d5c6827735e58b96f6b436e093acfd43ba8e49db6f33086a11f70c698b3/tf_training_notifier-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "b1176631639728827c91e3bb72c20938",
                "sha256": "da082704862bcf263bf3c55107dcaed8d8bb373720e11abfcc79d87e2dafe871"
            },
            "downloads": -1,
            "filename": "tf-training-notifier-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b1176631639728827c91e3bb72c20938",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4384,
            "upload_time": "2022-12-31T01:09:40",
            "upload_time_iso_8601": "2022-12-31T01:09:40.458084Z",
            "url": "https://files.pythonhosted.org/packages/b0/50/a5e55e6d3c896c839fee0ae5d4443291d89d3ea5bd216ebb2d58b7962655/tf-training-notifier-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-31 01:09:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "tf-training-notifier"
}
        
Elapsed time: 0.02215s