diff --git a/baselines/common/plot_util.py b/baselines/common/plot_util.py index 1d105c8..8009295 100644 --- a/baselines/common/plot_util.py +++ b/baselines/common/plot_util.py @@ -332,7 +332,7 @@ def plot_results( xys = gresults[group] if not any(xys): continue - color = COLORS[groups.index(group)] + color = COLORS[groups.index(group) % len(COLORS)] origxs = [xy[0] for xy in xys] minxlen = min(map(len, origxs)) def allequal(qs): diff --git a/docs/viz/viz.ipynb b/docs/viz/viz.ipynb new file mode 100644 index 0000000..616371e --- /dev/null +++ b/docs/viz/viz.ipynb @@ -0,0 +1,808 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "Ynb-laSwmpac" + }, + "source": [ + "# Loading and visualizing results\n", + "In order to compare performance of algorithms, we often would like to visualize learning curves (reward as a function of time steps), or some other auxiliary information about learning aggregated into a plot. Baselines repo provides tools for doing so in several different ways, depending on the goal." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "yreoV7OClzYG" + }, + "source": [ + "## Preliminaries / TensorBoard\n", + "First, let us install baselines repo from github" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "r4Aul2Qujlg9" + }, + "outputs": [], + "source": [ + "!pip install git+https://github.com/openai/baselines > ~/pip_install_baselines.log" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "1n7XAyVWniRp" + }, + "source": [ + "For all algorithms in baselines summary data is saved into a folder defined by logger. By default, a folder $TMPDIR/openai--