Simple live value plotter using Matplotlib
Project description
Develocorder
Develocorder is a simple live value plotter for Python3 using Matplotlib. It is intended to give insights into the training of machine learning models / reinforcement learning agents with only minimal effort to add to existing code.
Installation
$ pip install develocorder
Simple Example
# initialize once
set_recorder(my_value=LinePlot())
# add values to plot from anywhere in code
for _ in range(10):
record(my_value=random())
Result
Fancy Example
Some more features:
# axis labels
set_recorder(score=LinePlot(xlabel="Episode", ylabel="Score"))
# filter values (window filter kernel)
set_recorder(loss=LinePlot(filter_size=64))
# maximum history length
set_recorder(loss_detail=LinePlot(max_length=50))
# show heatmap for recording 1d-array values
set_recorder(array_values=Heatmap(max_length=1000))
# minimum update period (limit rate a which graphs are redrawn for better performance)
set_update_period(0.5) # [seconds]
# set number of columns
set_num_columns(2)
Jupyter notebook
For use in a Jupyter notebook use the %matplotlib notebook
backend. As of now you cannot rerun the cell which is showing the plot without restarting the notebook, otherwise the plot will disappear.
TODOs
- document how to extend
- better support for jupyter notebook
- add new plot types
- persistent storage/loading of log
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
develocorder-0.3.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for develocorder-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea50283c5e9da1b838845931c521f270cf41bb9c1e717065e00b2376dda0703 |
|
MD5 | e5abf223118dda358767b1e792763043 |
|
BLAKE2b-256 | f8f1d8e52cff837f10293f34528364ee802c7733e1751b22c7af9c7e0b35dbfa |