Skip to content

Commit

Permalink
Preview documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 16, 2024
1 parent 38d22a0 commit fe5de6c
Show file tree
Hide file tree
Showing 49 changed files with 254 additions and 213 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified preview_pr/_images/sphx_glr_plot_TS_bandit_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_TS_bandit_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_TS_bandit_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_agent_manager_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_agent_manager_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_exp3_bandit_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_exp3_bandit_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_mirror_bandit_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_mirror_bandit_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_smooth_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_smooth_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_smooth_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_ucb_bandit_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_ucb_bandit_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_writer_wrapper_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_writer_wrapper_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview_pr/_images/sphx_glr_plot_writer_wrapper_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions preview_pr/_modules/rlberry/manager/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,26 @@ <h1>Source code for rlberry.manager.utils</h1><div class="highlight"><pre>

<div class="viewcode-block" id="tensorboard_folder_to_dataframe"><a class="viewcode-back" href="../../../generated/rlberry.manager.tensorboard_folder_to_dataframe.html#rlberry.manager.tensorboard_folder_to_dataframe">[docs]</a><span class="k">def</span> <span class="nf">tensorboard_folder_to_dataframe</span><span class="p">(</span><span class="n">path_to_tensorboard_data</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> path_to_tensorboard_data : path to the tensorboard data. It must be the parent folder of all the training, and the event have to be in this kind of path : &lt;path_to_tensorboard_data/algo_name/n_simu/events.out.tfevents.xxxxx&gt;</span>

<span class="sd"> Return a dict of panda dataframe (key = tag, value = panda.dataframe)</span>
<span class="sd"> Function to convert &#39;tensorboard log&#39; to &#39;Panda DataFrames&#39;</span>

<span class="sd"> To convert the &#39;tensorboard log&#39;, the input must be must be the path to &quot;the parent folder of all the training log&quot; (path_to_tensorboard_data), and the &#39;events.out.tfevents&#39; files have to be in this kind of path :</span>
<span class="sd"> &lt; path_to_tensorboard_data/algo_name/n_simu/events.out.tfevents.xxxxx &gt;</span>

<span class="sd"> The output format is a dictionary.</span>
<span class="sd"> key = tag (type of data)</span>
<span class="sd"> value = Panda DataFrame with the following structure (4 column) :</span>
<span class="sd"> &quot;name&quot; = algo_name</span>
<span class="sd"> &quot;n_simu&quot; = n_simu (seed)</span>
<span class="sd"> &quot;x&quot; = step number</span>
<span class="sd"> &quot;y&quot; = value of the data</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_to_tensorboard_data : path to the parent folder of the tensorboard&#39;s data.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> Dict : dict of Panda DataFrame (key = tag, value = Panda.DataFrame)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">tensorboard.backend.event_processing</span> <span class="kn">import</span> <span class="n">event_accumulator</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ For the Gaussian case, we use a Gaussian prior and compare it to a sub-Gaussian

.. code-block:: none
[INFO] 10:02: ... trained!
[INFO] 10:02: Saved ExperimentManager(Bounded UCB Agent) using pickle.
[INFO] 10:02: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Bounded UCB Agent_2024-10-16_10-02-15_bd80da50/manager_obj.pickle'
[INFO] 10:02: Running ExperimentManager fit() for Bernoulli TS Agent with n_fit = 10 and max_workers = None.
[INFO] 10:02: ... trained!
[INFO] 10:02: Saved ExperimentManager(Bernoulli TS Agent) using pickle.
[INFO] 10:02: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Bernoulli TS Agent_2024-10-16_10-02-15_847030c5/manager_obj.pickle'
[INFO] 10:02: Running ExperimentManager fit() for Gaussian UCB Agent with n_fit = 10 and max_workers = None.
[INFO] 10:02: ... trained!
[INFO] 10:02: Saved ExperimentManager(Gaussian UCB Agent) using pickle.
[INFO] 10:02: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Gaussian UCB Agent_2024-10-16_10-02-26_8ade7c97/manager_obj.pickle'
[INFO] 10:02: Running ExperimentManager fit() for Gaussian TS Agent with n_fit = 10 and max_workers = None.
[INFO] 10:02: ... trained!
[INFO] 10:02: Saved ExperimentManager(Gaussian TS Agent) using pickle.
[INFO] 10:02: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Gaussian TS Agent_2024-10-16_10-02-26_ae7d0a45/manager_obj.pickle'
[INFO] 12:45: ... trained!
[INFO] 12:45: Saved ExperimentManager(Bounded UCB Agent) using pickle.
[INFO] 12:45: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Bounded UCB Agent_2024-10-16_12-45-04_319cb7e6/manager_obj.pickle'
[INFO] 12:45: Running ExperimentManager fit() for Bernoulli TS Agent with n_fit = 10 and max_workers = None.
[INFO] 12:45: ... trained!
[INFO] 12:45: Saved ExperimentManager(Bernoulli TS Agent) using pickle.
[INFO] 12:45: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Bernoulli TS Agent_2024-10-16_12-45-04_279a356f/manager_obj.pickle'
[INFO] 12:45: Running ExperimentManager fit() for Gaussian UCB Agent with n_fit = 10 and max_workers = None.
[INFO] 12:45: ... trained!
[INFO] 12:45: Saved ExperimentManager(Gaussian UCB Agent) using pickle.
[INFO] 12:45: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Gaussian UCB Agent_2024-10-16_12-45-15_f7d90f4f/manager_obj.pickle'
[INFO] 12:45: Running ExperimentManager fit() for Gaussian TS Agent with n_fit = 10 and max_workers = None.
[INFO] 12:45: ... trained!
[INFO] 12:45: Saved ExperimentManager(Gaussian TS Agent) using pickle.
[INFO] 12:45: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/Gaussian TS Agent_2024-10-16_12-45-15_9c0d4b7a/manager_obj.pickle'
Expand Down Expand Up @@ -224,7 +224,7 @@ For the Gaussian case, we use a Gaussian prior and compare it to a sub-Gaussian
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 20.469 seconds)
**Total running time of the script:** (0 minutes 20.350 seconds)


.. _sphx_glr_download_auto_examples_demo_bandits_plot_TS_bandit.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ how to use subplots in with `plot_writer_data`
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 41.147 seconds)
**Total running time of the script:** (0 minutes 41.099 seconds)


.. _sphx_glr_download_auto_examples_demo_bandits_plot_compare_index_bandits.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ randomized algorithm.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 7.648 seconds)
**Total running time of the script:** (0 minutes 7.662 seconds)


.. _sphx_glr_download_auto_examples_demo_bandits_plot_exp3_bandit.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ and finally definition of the experiment.

.. code-block:: none
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.821 2 4
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.465 7 9
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.459 7 17
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.464 7 25
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.314 7 33
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.301 3 43
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.313 6 53
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.306 3 63
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.308 6 73
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.304 6 83
[INFO] 10:03: agent_name worker reward action max_global_step
SH 0 -0.307 6 93
[INFO] 10:03: ... trained!
[INFO] 10:03: Saved ExperimentManager(SH) using pickle.
[INFO] 10:03: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/SH_2024-10-16_10-03-17_feb7766d/manager_obj.pickle'
The optimal action (fastest server) is server number 7
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.625 3 5
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.458 1 11
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.306 2 20
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.61 1 27
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.301 6 36
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.309 4 46
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.303 6 56
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.306 7 66
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.303 6 73
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.302 6 83
[INFO] 12:46: agent_name worker reward action max_global_step
SH 0 -0.301 6 93
[INFO] 12:46: ... trained!
[INFO] 12:46: Saved ExperimentManager(SH) using pickle.
[INFO] 12:46: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/SH_2024-10-16_12-46-06_13e762a8/manager_obj.pickle'
The optimal action (fastest server) is server number 8
Expand Down Expand Up @@ -251,7 +251,7 @@ and finally definition of the experiment.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 37.576 seconds)
**Total running time of the script:** (0 minutes 36.308 seconds)


.. _sphx_glr_download_auto_examples_demo_bandits_plot_mirror_bandit.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ This script shows how to define a bandit environment and an UCB Index-based algo
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 4.924 seconds)
**Total running time of the script:** (0 minutes 4.902 seconds)


.. _sphx_glr_download_auto_examples_demo_bandits_plot_ucb_bandit.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

Computation times
=================
**01:51.763** total execution time for **auto_examples_demo_bandits** files:
**01:50.320** total execution time for **auto_examples_demo_bandits** files:

+--------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_compare_index_bandits.py` (``plot_compare_index_bandits.py``) | 00:41.147 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_compare_index_bandits.py` (``plot_compare_index_bandits.py``) | 00:41.099 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_mirror_bandit.py` (``plot_mirror_bandit.py``) | 00:37.576 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_mirror_bandit.py` (``plot_mirror_bandit.py``) | 00:36.308 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_TS_bandit.py` (``plot_TS_bandit.py``) | 00:20.469 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_TS_bandit.py` (``plot_TS_bandit.py``) | 00:20.350 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_exp3_bandit.py` (``plot_exp3_bandit.py``) | 00:07.648 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_exp3_bandit.py` (``plot_exp3_bandit.py``) | 00:07.662 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_ucb_bandit.py` (``plot_ucb_bandit.py``) | 00:04.924 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_demo_bandits_plot_ucb_bandit.py` (``plot_ucb_bandit.py``) | 00:04.902 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------+-----------+--------+
24 changes: 12 additions & 12 deletions preview_pr/_sources/auto_examples/plot_agent_manager.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ Finally, we compare with a baseline provided by a random policy using the Experi

.. code-block:: none
[INFO] 10:01: ... trained!
[INFO] 10:01: Saved ExperimentManager(ValueIterationAgent) using pickle.
[INFO] 10:01: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/ValueIterationAgent_2024-10-16_10-01-58_8d70b7e4/manager_obj.pickle'
[INFO] 10:01: Running ExperimentManager fit() for RandomAgent with n_fit = 1 and max_workers = None.
[INFO] 10:01: ... trained!
[INFO] 10:01: Saved ExperimentManager(RandomAgent) using pickle.
[INFO] 10:01: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/RandomAgent_2024-10-16_10-01-59_00aad013/manager_obj.pickle'
[INFO] 10:01: Evaluating ValueIterationAgent...
[INFO] 10:01: Computing 10 evaluations.
[INFO] 12:44: ... trained!
[INFO] 12:44: Saved ExperimentManager(ValueIterationAgent) using pickle.
[INFO] 12:44: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/ValueIterationAgent_2024-10-16_12-44-47_80b8b7fe/manager_obj.pickle'
[INFO] 12:44: Running ExperimentManager fit() for RandomAgent with n_fit = 1 and max_workers = None.
[INFO] 12:44: ... trained!
[INFO] 12:44: Saved ExperimentManager(RandomAgent) using pickle.
[INFO] 12:44: The ExperimentManager was saved in : 'rlberry_data/temp/manager_data/RandomAgent_2024-10-16_12-44-48_7ba13ec9/manager_obj.pickle'
[INFO] 12:44: Evaluating ValueIterationAgent...
[INFO] 12:44: Computing 10 evaluations.
[INFO] Evaluation:.......... Evaluation finished
[INFO] 10:01: Evaluating RandomAgent...
[INFO] 10:01: Computing 10 evaluations.
[INFO] 12:44: Evaluating RandomAgent...
[INFO] 12:44: Computing 10 evaluations.
[INFO] Evaluation:.......... Evaluation finished
Expand Down Expand Up @@ -186,7 +186,7 @@ Finally, we compare with a baseline provided by a random policy using the Experi
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.233 seconds)
**Total running time of the script:** (0 minutes 1.153 seconds)


.. _sphx_glr_download_auto_examples_plot_agent_manager.py:
Expand Down
Loading

0 comments on commit fe5de6c

Please sign in to comment.