This repo support auto line plot for multi-seed event file from TensorBoard
Project description
AutoLinePlotter
This repo support auto line plot for multi-seed event files from TensorBoard
To use this AutoLinePlotter, simply pip install AutoLinePlotter
. Then, import plotter
function from AutoLinePlotter
to make a lineplot/lineplots.
For the function plotter
, it has the following inputs:
root: str,
: the location of the folder containing all algorithms data. Each is a folder containing a few seeds of event file generated from TensorBoard.
titles: List[str]
: the titles to be plotted in each diagram; This has no effect in plot_together mode
labels: List[str]
: the labels for each algorithm
x_axes: List[str]
: the x-axis for each diagram; This has no effect in plot_together mode
y_axes: List[str]
: the y-axis for each diagram; This has no effect in plot_together mode
plot_together: bool = False
: whether to plot together or not
plot_together_x_axis: str = None
: if plot_together, indicates the x axis for the plot
plot_together_y_axis: str = None
: if plot_together, indicates the y axis for the plot
plot_together_title: str = None
: if plot_together, indicates the title for the plot
For example, under User/files/pong
directory (see below), we have two folders: pong_c51
and pong_dqn
in which a few events files are included respectively.
In this case, root
should be 'User/files/pong'
; titles
could be ['pong_c51', 'pong_dqn']
; labels could be ['pong_c51', 'pong_dqn']
;
x_axes
could be ['env_step','env_step']
, y_axes
could be ['return','return']
.
User/files/pong
- pong_c51
- events.out.tfevents.1632662517.pong-c51-seed0
- events.out.tfevents.1632662517.pong-c51-seed1
- events.out.tfevents.1632662517.pong-c51-seed2
- events.out.tfevents.1632662517.pong-c51-seed3
- events.out.tfevents.1632662517.pong-c51-seed4
- pong_dqn
- events.out.tfevents.1632662517.pong-dqn-seed0
- events.out.tfevents.1632662517.pong-dqn-seed1
- events.out.tfevents.1632662517.pong-dqn-seed2
- events.out.tfevents.1632662517.pong-dqn-seed3
- events.out.tfevents.1632662517.pong-dqn-seed4
Funcion output
Notice
titles
, labels
, x_axes
, y_axes
should follow the alphabetical order for the files within root. This is, in the case above, all these
four list will be of dimension two. For whatever one enters, the first element in all these four lists should point to the final graph of pong_c51
and the
second element in all these four lists should point to the final graph of pong_dqn
.
The only restriction in naming folders is for the folders containing events files. The format should be env_algo
. For instance, in the above case, the two folders are named
pong_c51
and pong_dqn
respectively. (there should not be any _
within env
or algo
naming)
If plot_together
is enabled, these line plots will be plotted together. So, besides the above input, users should turn on plot_together
and set
plot_together_x_axis
, plot_together_y_axis
and plot_together_title
. Notice that in this case, titles
, x_axes
, y_axes
will have no effects. However,
They should be implemented as if the user wants to plot with plot_together=False
to avoid errors. If plot_together
is enabled, the output for the above example is as follows:
Funcion output
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file AutoLinePlotter-0.0.2.tar.gz
.
File metadata
- Download URL: AutoLinePlotter-0.0.2.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39569aa22a43d85621d6fe1f6f45dfa02a8151b3b760cc208991b1d94a14e458 |
|
MD5 | 18a03186cb684676731ee1d6a577651b |
|
BLAKE2b-256 | c5a57d9a01a403d76c95a4e252c0f8605f77b69e36edb828ded8eb22af2cce91 |
File details
Details for the file AutoLinePlotter-0.0.2-py3.8.egg
.
File metadata
- Download URL: AutoLinePlotter-0.0.2-py3.8.egg
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc140343eae7ddab2055473c6803570798fc00dd0952048bf69fa24b1d3be3f2 |
|
MD5 | 53e91f6ca9c7622daf95f981186dcb25 |
|
BLAKE2b-256 | e33df5818ebaf9490c24453277e3724915f12d31a97cfae6a839a1d7a213cb8c |
File details
Details for the file AutoLinePlotter-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: AutoLinePlotter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 923af55c15ce33ab1c18442efd6464f7984ea82f363c7be7c70ba7065c12a9d5 |
|
MD5 | 0c64bb635968af32fd9ff40687c9353f |
|
BLAKE2b-256 | 42599c82699975c33762a49cf1a50425b35c3fba4948663444f3d219c9896a5b |