tf-compactprogbar


Nametf-compactprogbar JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryA simple and compact one-line progress bar for TensorFlow 2 Keras.
upload_time2024-10-24 06:10:30
maintainerNone
docs_urlNone
authorAdam Wu
requires_python>=3.7
licenseMIT License Copyright (c) [2024] [adamvvu] 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 progress bar callbacks deep learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build](https://img.shields.io/github/actions/workflow/status/adamvvu/tf_compactprogbar/tf_compactprogbar_tests.yml?style=for-the-badge)](https://github.com/adamvvu/tf_compactprogbar/actions/workflows/tf_compactprogbar_tests.yml)
[![PyPi](https://img.shields.io/pypi/v/tf_compactprogbar?style=for-the-badge)](https://pypi.org/project/tf-compactprogbar/)
[![Downloads](https://img.shields.io/pypi/dm/tf_compactprogbar?style=for-the-badge)](https://pypi.org/project/tf-compactprogbar/)
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://github.com/adamvvu/tf_compactprogbar/blob/master/LICENSE)
[![Binder](https://img.shields.io/badge/DEMO-binder-blue?style=for-the-badge)](https://mybinder.org/v2/gh/adamvvu/tf_compactprogbar/HEAD?labpath=examples%2Fexample.ipynb)

A simple and compact one-line progress bar for TensorFlow 2 Keras.

---

## TensorFlow Compact Progress Bar

Existing ways of monitoring training of TensorFlow Keras models either display nothing (`verbose=0`), one progress bar per epoch (`verbose=1`), or prints one line of metrics per epoch (`verbose=2`). When training for thousands of epochs, this often leads to bloated log files or crashed/sluggish Jupyter environments when working interactively.

This library provides a compact progress bar that simply displays the overall training progress by epoch. There are also a few small additional features for convenience, such as excluding certain metrics to avoid excessive clutter.

**Notebook mode**
![notebook_demo](assets/compact.png)

**Console mode**
![console_demo](assets/compact_noninteractive.png)

### Getting Started

Install from PyPi:

`$ pip install tf-compactprogbar`

#### Dependencies

- `tensorflow >= 2` *(TF 1 likely works, but untested)*
- `tqdm`
- `python >= 3.7`
- `ipywidgets` *(Optional)*
- `jupyterlab_widgets` *(Optional)*

For nice looking Jupyter/IPython progress bars, make sure you have `ipywidgets` and `jupyterlab_widgets` if you are on Jupyter Lab.

#### Usage

To use it, disable the built-in logging (`verbose=0`) and pass it in as a Callback:
```
from tf_compactprogbar import CompactProgressBar

progBar = CompactProgressBar()
history = model.fit(X_train, Y_train,
                    epochs=200,
                    batch_size=100,
                    verbose=0,
                    validation_data = (X_test, Y_test),
                    callbacks=[progBar])
```


### Documentation

```
# Call signature
CompactProgressBar(show_best=True, best_as_max=[], exclude=[], notebook='auto', epochs=None)

Args:
        - show_best    (bool)      Display best metrics. Default: True
        - best_as_max  (list)      Metrics which should be maximized (see note)
        - exclude      (list)      Metrics which should be excluded from display
        - notebook     (str/bool)  Whether to use IPython/Jupyter widget or console. Default: 'auto'
        - epochs       (int)       Optional total number of epochs. Default is inferred from `.fit`.
        
Note: When using `show_best`, by default the "best" metric is the minimum. Pass
in the metric name to `best_as_max` to change this behavior.
```

If there are any issues in Jupyter, please see the [tqdm Issues](https://github.com/tqdm/tqdm/issues) page for help or disable notebook mode with `notebook=False`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tf-compactprogbar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "tensorflow, progress bar, callbacks, deep learning",
    "author": "Adam Wu",
    "author_email": "adamwu1@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/fe/29/f716b156138bbc8cb2bb80d19e67643ed5cfd2152c367dac1e648d515722/tf_compactprogbar-1.0.1.tar.gz",
    "platform": null,
    "description": "[![Build](https://img.shields.io/github/actions/workflow/status/adamvvu/tf_compactprogbar/tf_compactprogbar_tests.yml?style=for-the-badge)](https://github.com/adamvvu/tf_compactprogbar/actions/workflows/tf_compactprogbar_tests.yml)\r\n[![PyPi](https://img.shields.io/pypi/v/tf_compactprogbar?style=for-the-badge)](https://pypi.org/project/tf-compactprogbar/)\r\n[![Downloads](https://img.shields.io/pypi/dm/tf_compactprogbar?style=for-the-badge)](https://pypi.org/project/tf-compactprogbar/)\r\n[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://github.com/adamvvu/tf_compactprogbar/blob/master/LICENSE)\r\n[![Binder](https://img.shields.io/badge/DEMO-binder-blue?style=for-the-badge)](https://mybinder.org/v2/gh/adamvvu/tf_compactprogbar/HEAD?labpath=examples%2Fexample.ipynb)\r\n\r\nA simple and compact one-line progress bar for TensorFlow 2 Keras.\r\n\r\n---\r\n\r\n## TensorFlow Compact Progress Bar\r\n\r\nExisting ways of monitoring training of TensorFlow Keras models either display nothing (`verbose=0`), one progress bar per epoch (`verbose=1`), or prints one line of metrics per epoch (`verbose=2`). When training for thousands of epochs, this often leads to bloated log files or crashed/sluggish Jupyter environments when working interactively.\r\n\r\nThis library provides a compact progress bar that simply displays the overall training progress by epoch. There are also a few small additional features for convenience, such as excluding certain metrics to avoid excessive clutter.\r\n\r\n**Notebook mode**\r\n![notebook_demo](assets/compact.png)\r\n\r\n**Console mode**\r\n![console_demo](assets/compact_noninteractive.png)\r\n\r\n### Getting Started\r\n\r\nInstall from PyPi:\r\n\r\n`$ pip install tf-compactprogbar`\r\n\r\n#### Dependencies\r\n\r\n- `tensorflow >= 2` *(TF 1 likely works, but untested)*\r\n- `tqdm`\r\n- `python >= 3.7`\r\n- `ipywidgets` *(Optional)*\r\n- `jupyterlab_widgets` *(Optional)*\r\n\r\nFor nice looking Jupyter/IPython progress bars, make sure you have `ipywidgets` and `jupyterlab_widgets` if you are on Jupyter Lab.\r\n\r\n#### Usage\r\n\r\nTo use it, disable the built-in logging (`verbose=0`) and pass it in as a Callback:\r\n```\r\nfrom tf_compactprogbar import CompactProgressBar\r\n\r\nprogBar = CompactProgressBar()\r\nhistory = model.fit(X_train, Y_train,\r\n                    epochs=200,\r\n                    batch_size=100,\r\n                    verbose=0,\r\n                    validation_data = (X_test, Y_test),\r\n                    callbacks=[progBar])\r\n```\r\n\r\n\r\n### Documentation\r\n\r\n```\r\n# Call signature\r\nCompactProgressBar(show_best=True, best_as_max=[], exclude=[], notebook='auto', epochs=None)\r\n\r\nArgs:\r\n        - show_best    (bool)      Display best metrics. Default: True\r\n        - best_as_max  (list)      Metrics which should be maximized (see note)\r\n        - exclude      (list)      Metrics which should be excluded from display\r\n        - notebook     (str/bool)  Whether to use IPython/Jupyter widget or console. Default: 'auto'\r\n        - epochs       (int)       Optional total number of epochs. Default is inferred from `.fit`.\r\n        \r\nNote: When using `show_best`, by default the \"best\" metric is the minimum. Pass\r\nin the metric name to `best_as_max` to change this behavior.\r\n```\r\n\r\nIf there are any issues in Jupyter, please see the [tqdm Issues](https://github.com/tqdm/tqdm/issues) page for help or disable notebook mode with `notebook=False`.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) [2024] [adamvvu]  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": "A simple and compact one-line progress bar for TensorFlow 2 Keras.",
    "version": "1.0.1",
    "project_urls": {
        "documentation": "https://github.com/adamvvu/tf_compactprog_bar",
        "homepage": "https://github.com/adamvvu/tf_compactprogbar",
        "repository": "https://github.com/adamvvu/tf_compactprogbar"
    },
    "split_keywords": [
        "tensorflow",
        " progress bar",
        " callbacks",
        " deep learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0e7e55dec62cc02211832c51d456c8f8312c1ca8a17c620de53dc682b43f805",
                "md5": "fbae35a950ee47522dd839b7a70c48a9",
                "sha256": "46427d5e10c8e7d7b4c9eb49e861310b1d081a40b2052d09a05057e0408e6d03"
            },
            "downloads": -1,
            "filename": "tf_compactprogbar-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fbae35a950ee47522dd839b7a70c48a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5809,
            "upload_time": "2024-10-24T06:10:28",
            "upload_time_iso_8601": "2024-10-24T06:10:28.794756Z",
            "url": "https://files.pythonhosted.org/packages/a0/e7/e55dec62cc02211832c51d456c8f8312c1ca8a17c620de53dc682b43f805/tf_compactprogbar-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe29f716b156138bbc8cb2bb80d19e67643ed5cfd2152c367dac1e648d515722",
                "md5": "9d85a44636f8c7999183d06d06048c88",
                "sha256": "bca327d721d14b46b71c77c92dd37ec58c757073b50d60a768338202b663ffa2"
            },
            "downloads": -1,
            "filename": "tf_compactprogbar-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9d85a44636f8c7999183d06d06048c88",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6557,
            "upload_time": "2024-10-24T06:10:30",
            "upload_time_iso_8601": "2024-10-24T06:10:30.131385Z",
            "url": "https://files.pythonhosted.org/packages/fe/29/f716b156138bbc8cb2bb80d19e67643ed5cfd2152c367dac1e648d515722/tf_compactprogbar-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 06:10:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamvvu",
    "github_project": "tf_compactprog_bar",
    "github_not_found": true,
    "lcname": "tf-compactprogbar"
}
        
Elapsed time: 0.52283s