{"id":13478334,"url":"https://github.com/stared/livelossplot","last_synced_at":"2025-04-29T14:36:38.948Z","repository":{"id":30352717,"uuid":"124682643","full_name":"stared/livelossplot","owner":"stared","description":"Live training loss plot in Jupyter Notebook for Keras, PyTorch and others","archived":false,"fork":false,"pushed_at":"2025-03-31T13:51:06.000Z","size":2305,"stargazers_count":1310,"open_issues_count":7,"forks_count":141,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-04-12T15:56:12.360Z","etag":null,"topics":["deep-learning","jupyter-notebook","keras","keras-visualization","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stared.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"stared"}},"created_at":"2018-03-10T17:51:43.000Z","updated_at":"2025-03-31T20:29:40.000Z","dependencies_parsed_at":"2025-01-24T08:00:29.628Z","dependency_job_id":"666d40e2-495f-4b1e-b8af-6377052e2171","html_url":"https://github.com/stared/livelossplot","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Flivelossplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Flivelossplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Flivelossplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Flivelossplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stared","download_url":"https://codeload.github.com/stared/livelossplot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251519941,"owners_count":21602414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","jupyter-notebook","keras","keras-visualization","pytorch"],"created_at":"2024-07-31T16:01:55.638Z","updated_at":"2025-04-29T14:36:38.918Z","avatar_url":"https://github.com/stared.png","language":"Python","readme":"# livelossplot\n\n[![livelossplot version - PyPI](https://img.shields.io/pypi/v/livelossplot)](https://pypi.org/project/livelossplot/)\n![PyPI status](https://img.shields.io/pypi/status/livelossplot.svg)\n![MIT license - PyPI](https://img.shields.io/pypi/l/livelossplot.svg)\n![Python version - PyPI](https://img.shields.io/pypi/pyversions/livelossplot.svg)\n[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/stared/livelossplot/pythonpackage.yml?branch=main)](https://github.com/stared/livelossplot/actions)\n[![GitHub Actions: Integrations](https://img.shields.io/github/actions/workflow/status/stared/livelossplot/external_packages.yml?branch=main\u0026label=integrations)](https://github.com/stared/livelossplot/actions)\n[![GitHub Actions: Linting](https://img.shields.io/github/actions/workflow/status/stared/livelossplot/flake8_yapf.yml?branch=main\u0026label=linting)](https://github.com/stared/livelossplot/actions)\n[![Downloads](http://pepy.tech/badge/livelossplot)](https://pepy.tech/project/livelossplot)\n[![Twitter @pmigdal](https://img.shields.io/twitter/follow/pmigdal)](https://twitter.com/pmigdal)\n\nDon't train deep learning models blindfolded! Be impatient and look at each epoch of your training!\n\n([RECENT CHANGES](CHANGELOG.md), [EXAMPLES IN COLAB](https://colab.research.google.com/github/stared/livelossplot), [API LOOKUP](http://p.migdal.pl/livelossplot/), [CODE](https://github.com/stared/livelossplot))\n\nA live training loss plot in [Jupyter Notebook](http://jupyter.org/) for [Keras](https://keras.io/), [PyTorch](http://pytorch.org/) and other frameworks. An open-source Python package by [Piotr Migdał](https://p.migdal.pl/), [Bartłomiej Olechno](https://github.com/Bartolo1024/) and [others](https://github.com/stared/livelossplot/graphs/contributors). **Open for collaboration!** (Some tasks are as simple as writing code docstrings, so - no excuses! :))\n\n```python\nfrom livelossplot import PlotLossesKeras\n\nmodel.fit(X_train, Y_train,\n          epochs=10,\n          validation_data=(X_test, Y_test),\n          callbacks=[PlotLossesKeras()],\n          verbose=0)\n```\n\n![Animated fig for livelossplot tracking log-loss and accuracy](https://raw.githubusercontent.com/stared/livelossplot/master/livelossplot.gif)\n\n- (The most FA)Q: Why not TensorBoard?\n- A: Jupyter Notebook compatibility (for exploration and teaching). The simplicity of use.\n\n## Installation\n\nTo install [this version from PyPI](https://pypi.org/project/livelossplot/), type:\n\n```bash\npip install livelossplot\n```\n\nTo get the newest one from this repo (note that we are in the alpha stage, so there may be frequent updates), type:\n\n```bash\npip install git+git://github.com/stared/livelossplot.git\n```\n\n## Examples\n\nLook at notebook files with full working [examples](https://github.com/stared/livelossplot/blob/main/examples/):\n\n- [keras.ipynb](https://github.com/stared/livelossplot/blob/main/examples/keras.ipynb) - a Keras callback\n- [minimal.ipynb](https://github.com/stared/livelossplot/blob/main/examples/minimal.ipynb) - a bare API, to use anywhere\n- [script.py](https://github.com/stared/livelossplot/blob/main/examples/script.py) - to be run as a script, `python script.py`\n- [bokeh.ipynb](https://github.com/stared/livelossplot/blob/main/examples/bokeh.ipynb) - a bare API, plots with Bokeh ([open it in Colab to see the plots](https://colab.research.google.com/github/stared/livelossplot/blob/main/examples/bokeh.ipynb))\n- [pytorch.ipynb](https://github.com/stared/livelossplot/blob/main/examples/pytorch.ipynb) - a bare API, as applied to PyTorch\n- [2d_prediction_maps.ipynb](https://github.com/stared/livelossplot/blob/main/examples/2d_prediction_maps.ipynb) - example of custom plots - 2d prediction maps (0.4.1+)\n- [poutyne.ipynb](https://github.com/stared/livelossplot/blob/main/examples/poutyne.ipynb) - a Poutyne callback ([Poutyne](https://poutyne.org/) is a Keras-like framework for PyTorch)\n- [torchbearer.ipynb](https://github.com/stared/livelossplot/blob/main/examples/torchbearer.ipynb) - an example using the built in functionality from torchbearer ([torchbearer](https://github.com/ecs-vlc/torchbearer) is a model fitting library for PyTorch)\n- [neptune.py](https://github.com/stared/livelossplot/blob/main/examples/neptune.py) and [neptune.ipynb](https://github.com/stared/livelossplot/blob/main/examples/neptune.ipynb) - a [Neptune.AI](https://neptune.ai/)\n- [matplotlib.ipynb](https://github.com/stared/livelossplot/blob/main/examples/matplotlib.ipynb) - a Matplotlib output example\n- [various_options.ipynb](https://github.com/stared/livelossplot/blob/main/examples/various_options.ipynb) - an extended API for metrics grouping and custom outputs\n\nYou [run examples in Colab](https://colab.research.google.com/github/stared/livelossplot).\n\n## Overview\n\nText logs are easy, but it's easy to miss the most crucial information: is it learning, doing nothing or overfitting?\nVisual feedback allows us to keep track of the training process. Now there is one for Jupyter.\n\nIf you want to get serious - use [TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard), .\nBut what if you just want to train a small model in Jupyter Notebook? Here is a way to do so, using `livelossplot` as a plug\u0026play component\n\n### from livelossplot import ...\n\n`PlotLosses` for a generic API.\n\n```{python}\nplotlosses = PlotLosses()\nplotlosses.update({'acc': 0.7, 'val_acc': 0.4, 'loss': 0.9, 'val_loss': 1.1})\nplot.send()  # draw, update logs, etc\n```\n\nThere are callbacks for common libraries and frameworks: `PlotLossesKeras`, `PlotLossesKerasTF`, `PlotLossesPoutyne`, `PlotLossesIgnite`.\n\nFeel invited to write, and contribute, your adapter.\nIf you want to use a bare logger, there is `MainLogger`.\n\n### from livelossplot.outputs import ...\n\nPlots: `MatplotlibPlot`, `BokehPlot`.\n\nLoggers: `ExtremaPrinter` (to standard output), `TensorboardLogger`, `TensorboardTFLogger`, `NeptuneLogger`.\n\nTo use them, initialize PlotLosses with some outputs:\n\n```{python}\nplotlosses = PlotLosses(outputs=[MatplotlibPlot(), TensorboardLogger()])\n```\n\nThere are custom `matplotlib` plots in `livelossplot.outputs.matplotlib_subplots` you can pass in `MatplotlibPlot` arguments.\n\nIf you like to plot with [Bokeh](https://docs.bokeh.org/en/latest/) instead of [matplotlib](https://matplotlib.org/), use\n\n```{python}\nplotlosses = PlotLosses(outputs=[BokehPlot()])\n```\n\n## Sponsors\n\nThis project supported by [Jacek Migdał](http://jacek.migdal.pl/), [Marek Cichy](https://medium.com/@marekkcichy/), [Casper da Costa-Luis](https://cdcl.ml/), and [Piotr Zientara](https://twitter.com/piotr_zientara). [Join the sponsors - show your ❤️ and support, and appear on the list](https://github.com/sponsors/stared)! It will give me time and energy to work on this project.\n\nThis project is also supported by a European program _Program Operacyjny Inteligentny Rozwój_ for [GearShift - building the engine of behavior of wheeled motor vehicles and map’s generation based on artificial intelligence algorithms implemented on the Unreal Engine platform](https://mapadotacji.gov.pl/projekty/874596/?lang=en) lead by ECC Games (NCBR grant GameINN).\n\n## Trivia\n\nIt started as [this gist](https://gist.github.com/stared/dfb4dfaf6d9a8501cd1cc8b8cb806d2e). Since it went popular, I decided to rewrite it as a package.\n\nOh, and I am in general interested in data vis, see [Simple diagrams of convoluted neural networks](https://medium.com/inbrowserai/simple-diagrams-of-convoluted-neural-networks-39c097d2925b) (and overview of deep learning architecture diagrams):\n\n\u003e A good diagram is worth a thousand equations — let’s create more of these!\n\n...or [my other data vis projects](https://p.migdal.pl/projects/).\n\n## Todo\n\nIf you want more functionality - open an [Issue](https://github.com/stared/livelossplot/issues) or even better - prepare a [Pull Request](https://github.com/stared/livelossplot/pulls).\n","funding_links":["https://github.com/sponsors/stared","https://github.com/sponsors/stared)!"],"categories":["Python","Data Visualization","工作流程和实验跟踪"],"sub_categories":["Data Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstared%2Flivelossplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstared%2Flivelossplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstared%2Flivelossplot/lists"}