Skip to content

Commit

Permalink
Theresa Eimer: Merge pull request #146 from automl/development
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Sep 30, 2024
1 parent 23aa0b3 commit db2fe7e
Show file tree
Hide file tree
Showing 111 changed files with 6,958 additions and 12,415 deletions.
2 changes: 1 addition & 1 deletion main/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1c6d393083550fce76b03340af4f5a7f
config: ed3e92bd4f52950fcb359a87a5157b21
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified main/.doctrees/environment.pickle
Binary file not shown.
Binary file modified main/.doctrees/index.doctree
Binary file not shown.
Binary file modified main/.doctrees/modules.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/cma.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/fastdownward.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/luby.doctree
Binary file not shown.
Binary file removed main/.doctrees/source/benchmark_docs/modcma.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/sgd.doctree
Binary file not shown.
Binary file removed main/.doctrees/source/benchmark_docs/sigmoid.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/theory.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmark_docs/toy_sgd.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/benchmarks.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/cite.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/containers.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/contrib.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/dac.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/installation.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/logging.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/modifications.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/modules.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/multi_agent_dac.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/plotting.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/state_and_reward.doctree
Binary file not shown.
Binary file modified main/.doctrees/source/wrappers.doctree
Binary file not shown.
446 changes: 193 additions & 253 deletions main/_modules/dacbench/abstract_benchmark.html

Large diffs are not rendered by default.

436 changes: 258 additions & 178 deletions main/_modules/dacbench/abstract_env.html

Large diffs are not rendered by default.

314 changes: 173 additions & 141 deletions main/_modules/dacbench/benchmarks/cma_benchmark.html

Large diffs are not rendered by default.

510 changes: 0 additions & 510 deletions main/_modules/dacbench/benchmarks/fast_downward_benchmark.html

This file was deleted.

Large diffs are not rendered by default.

622 changes: 0 additions & 622 deletions main/_modules/dacbench/benchmarks/geometric_benchmark.html

This file was deleted.

199 changes: 104 additions & 95 deletions main/_modules/dacbench/benchmarks/luby_benchmark.html

Large diffs are not rendered by default.

467 changes: 0 additions & 467 deletions main/_modules/dacbench/benchmarks/modcma_benchmark.html

This file was deleted.

289 changes: 136 additions & 153 deletions main/_modules/dacbench/benchmarks/sgd_benchmark.html

Large diffs are not rendered by default.

575 changes: 0 additions & 575 deletions main/_modules/dacbench/benchmarks/sigmoid_benchmark.html

This file was deleted.

168 changes: 90 additions & 78 deletions main/_modules/dacbench/benchmarks/theory_benchmark.html

Large diffs are not rendered by default.

160 changes: 90 additions & 70 deletions main/_modules/dacbench/benchmarks/toysgd_benchmark.html

Large diffs are not rendered by default.

471 changes: 216 additions & 255 deletions main/_modules/dacbench/envs/cma_es.html

Large diffs are not rendered by default.

243 changes: 125 additions & 118 deletions main/_modules/dacbench/envs/fast_downward.html

Large diffs are not rendered by default.

430 changes: 430 additions & 0 deletions main/_modules/dacbench/envs/function_approximation.html

Large diffs are not rendered by default.

957 changes: 0 additions & 957 deletions main/_modules/dacbench/envs/geometric.html

This file was deleted.

209 changes: 113 additions & 96 deletions main/_modules/dacbench/envs/luby.html

Large diffs are not rendered by default.

374 changes: 0 additions & 374 deletions main/_modules/dacbench/envs/modcma.html

This file was deleted.

1,275 changes: 324 additions & 951 deletions main/_modules/dacbench/envs/sgd.html

Large diffs are not rendered by default.

571 changes: 0 additions & 571 deletions main/_modules/dacbench/envs/sigmoid.html

This file was deleted.

437 changes: 244 additions & 193 deletions main/_modules/dacbench/envs/theory.html

Large diffs are not rendered by default.

259 changes: 104 additions & 155 deletions main/_modules/dacbench/envs/toysgd.html

Large diffs are not rendered by default.

698 changes: 392 additions & 306 deletions main/_modules/dacbench/logger.html

Large diffs are not rendered by default.

285 changes: 160 additions & 125 deletions main/_modules/dacbench/plotting.html

Large diffs are not rendered by default.

160 changes: 81 additions & 79 deletions main/_modules/dacbench/wrappers/action_tracking_wrapper.html

Large diffs are not rendered by default.

138 changes: 69 additions & 69 deletions main/_modules/dacbench/wrappers/episode_time_tracker.html

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions main/_modules/dacbench/wrappers/instance_sampling_wrapper.html

Large diffs are not rendered by default.

76 changes: 36 additions & 40 deletions main/_modules/dacbench/wrappers/multidiscrete_action_wrapper.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

<!DOCTYPE html>

<html lang="en">
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dacbench.wrappers.multidiscrete_action_wrapper &#8212; DACBench Documentation 0.2.0 documentation</title>
<title>dacbench.wrappers.multidiscrete_action_wrapper &#8212; DACBench Documentation 0.3.0 documentation</title>

<link href="../../../_static/css/theme.css" rel="stylesheet">
<link href="../../../_static/css/index.ac9c05f7c49ca1e1f876c6e36360ea26.css" rel="stylesheet">
Expand All @@ -22,14 +21,14 @@



<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/custom.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/custom.css?v=2eb4fb78" />

<link rel="preload" as="script" href="../../../_static/js/index.9ea38e314b9e6d9dab77.js">

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/documentation_options.js?v=f129cdf0"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -89,11 +88,11 @@
<div class="dropdown mt-1">
<button type="button" class="btn btn-secondary btn-md navbar-btn dropdown-toggle" id="dLabelMore"
data-toggle="dropdown">
v0.2.0
v0.3.0
<span class="caret"></span>
</button>
<div class="dropdown-menu list-group-flush py-0" aria-labelledby="dLabelMore">
<a class="list-group-item list-group-item-action" href="#">v0.2.0</a>
<a class="list-group-item list-group-item-action" href="#">v0.3.0</a>
</div>
</div>
</div>
Expand All @@ -118,7 +117,7 @@

<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar"><h4 class="mt-0 mb-0"><a href="../../../index.html">DACBench Documentation</a></h4>
<div class="mb-3">v0.2.0</div><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="mb-3">v0.3.0</div><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Expand Down Expand Up @@ -154,8 +153,8 @@
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/sigmoid.html">
The Sigmoid Toy Benchmark
<a class="reference internal" href="../../../source/benchmark_docs/function_approximation.html">
The Function Approximation Toy Benchmark
</a>
</li>
<li class="toctree-l1">
Expand All @@ -168,29 +167,14 @@
The ToySGD Benchmark
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/geometric.html">
The Geometric Toy Benchmark
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/fastdownward.html">
The FastDownward Benchmark
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/theory.html">
The Theory Benchmark
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/cma.html">
The PyCMA CMA-ES Benchmark
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../../source/benchmark_docs/modcma.html">
The IOHProfiler ModCMA Benchmark
The CMA-ES Benchmark
</a>
</li>
<li class="toctree-l1">
Expand Down Expand Up @@ -275,18 +259,25 @@
<div>

<h1>Source code for dacbench.wrappers.multidiscrete_action_wrapper</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">itertools</span>
<span></span><span class="sd">&quot;&quot;&quot;Wrapper for casting MultiDiscrete action spaces to Discrete.&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">import</span> <span class="nn">itertools</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">gymnasium</span> <span class="kn">import</span> <span class="n">Wrapper</span><span class="p">,</span> <span class="n">spaces</span>


<div class="viewcode-block" id="MultiDiscreteActionWrapper"><a class="viewcode-back" href="../../../source/wrappers.html#dacbench.wrappers.MultiDiscreteActionWrapper">[docs]</a><span class="k">class</span> <span class="nc">MultiDiscreteActionWrapper</span><span class="p">(</span><span class="n">Wrapper</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Wrapper to cast MultiDiscrete action spaces to Discrete. This should improve usability with standard RL libraries.&quot;&quot;&quot;</span>
<div class="viewcode-block" id="MultiDiscreteActionWrapper">
<a class="viewcode-back" href="../../../source/wrappers.html#dacbench.wrappers.MultiDiscreteActionWrapper">[docs]</a>
<span class="k">class</span> <span class="nc">MultiDiscreteActionWrapper</span><span class="p">(</span><span class="n">Wrapper</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Wrapper to cast MultiDiscrete action spaces to Discrete.</span>
<span class="sd"> This should improve usability with standard RL libraries.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Initialize wrapper.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Initialize wrapper.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand All @@ -295,19 +286,24 @@ <h1>Source code for dacbench.wrappers.multidiscrete_action_wrapper</h1><div clas

<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">env</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n_actions</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">nvec</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">action_space</span> <span class="o">=</span> <span class="n">spaces</span><span class="o">.</span><span class="n">Discrete</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">prod</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">nvec</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n_actions</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">action_space</span> <span class="o">=</span> <span class="n">spaces</span><span class="o">.</span><span class="n">Discrete</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">prod</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">action_mapper</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">idx</span><span class="p">,</span> <span class="n">prod_idx</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span>
<span class="nb">range</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">prod</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">nvec</span><span class="p">)),</span>
<span class="n">itertools</span><span class="o">.</span><span class="n">product</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="k">for</span> <span class="n">val</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="o">.</span><span class="n">nvec</span><span class="p">]),</span>
<span class="n">itertools</span><span class="o">.</span><span class="n">product</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="k">for</span> <span class="n">val</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">action_space</span><span class="p">]),</span>
<span class="n">strict</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">action_mapper</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span> <span class="o">=</span> <span class="n">prod_idx</span>

<div class="viewcode-block" id="MultiDiscreteActionWrapper.step"><a class="viewcode-back" href="../../../source/wrappers.html#dacbench.wrappers.MultiDiscreteActionWrapper.step">[docs]</a> <span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
<div class="viewcode-block" id="MultiDiscreteActionWrapper.step">
<a class="viewcode-back" href="../../../source/wrappers.html#dacbench.wrappers.MultiDiscreteActionWrapper.step">[docs]</a>
<span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Maps discrete action value to array.&quot;&quot;&quot;</span>
<span class="n">action</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">action_mapper</span><span class="p">[</span><span class="n">action</span><span class="p">]</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">action</span><span class="p">)</span></div></div>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">action</span><span class="p">)</span></div>
</div>

</pre></div>

</div>
Expand Down Expand Up @@ -336,7 +332,7 @@ <h1>Source code for dacbench.wrappers.multidiscrete_action_wrapper</h1><div clas
<div class="footer-item">
<p class="sphinx-version">
Created using <a href="http://sphinx-doc.org/">Sphinx</a>
6.1.3. Template is modified version of <a
8.0.2. Template is modified version of <a
href="https://pydata-sphinx-theme.readthedocs.io">PyData Sphinx Theme</a>. <br>
</p>
</div>
Expand Down
Loading

0 comments on commit db2fe7e

Please sign in to comment.