Giter Club home page Giter Club logo

develocorder's Introduction

Develocorder

Pytest badge

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.

Original Develocorder

(image source)

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())

See examples/simple.py

Result

Simple Example

Fancy Example

Some more features:

# axis labels
set_recorder(labeled=LinePlot(xlabel="Episode", ylabel="Score"))

# additional filtered values (window filter)
set_recorder(filtered=FilteredLinePlot(filter_size=50))

# maximum history length
set_recorder(detail=LinePlot(max_length=50))

# downsampled values (record mean of every filter_size values)
set_recorder(downsampled=DownsampledLinePlot(filter_size=5))

# multiple curves for recording 1d-array values
set_recorder(multiple=FilteredLinePlot(filter_size=50))

# heatmap for recording 1d-array values
set_recorder(heatmap=Heatmap())

# minimum update period (limit update rate for better performance)
set_update_period(0.5)  # [seconds]

# set number of columns
set_num_columns(2)

See examples/fancy.py

Fancy Example

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.

See examples/simple.ipynb

TODOs

  • document how to extend
  • better support for jupyter notebook
  • add new plot types
  • persistent storage/loading of log

develocorder's People

Contributors

a-metz avatar

Stargazers

Xianhui_Kong avatar Titus Ebbecke avatar Michael Farnsworth avatar Jacob Danovitch avatar Jon Baer avatar saw avatar Jason Won avatar Sreekumar Thaithara Balan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.