Skip to content

Commit

Permalink
deploy: 669738f
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 16, 2024
1 parent 033af70 commit 3f63afc
Show file tree
Hide file tree
Showing 59 changed files with 1,149 additions and 3,627 deletions.
41 changes: 30 additions & 11 deletions api/_modules/aepsych/acquisition/lookahead.html

Large diffs are not rendered by default.

41 changes: 30 additions & 11 deletions api/_modules/aepsych/acquisition/lookahead/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api/_modules/aepsych/benchmark/benchmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ <h1>Source code for aepsych.benchmark.benchmark</h1><div class="highlight"><pre>
<span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"lb"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">lb</span><span class="o">.</span><span class="n">tolist</span><span class="p">())</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"ub"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">ub</span><span class="o">.</span><span class="n">tolist</span><span class="p">())</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"dim"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">lb</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"parnames"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span>
<span class="p">[</span><span class="sa">f</span><span class="s2">"par</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">ub</span><span class="o">.</span><span class="n">tolist</span><span class="p">()))]</span>
<span class="p">)</span>
Expand Down
1 change: 1 addition & 0 deletions api/_modules/aepsych/benchmark/benchmark/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ <h1>Source code for aepsych.benchmark.benchmark</h1><div class="highlight"><pre>
<span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"lb"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">lb</span><span class="o">.</span><span class="n">tolist</span><span class="p">())</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"ub"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">ub</span><span class="o">.</span><span class="n">tolist</span><span class="p">())</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"dim"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">lb</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">config_dict</span><span class="p">[</span><span class="s2">"common"</span><span class="p">][</span><span class="s2">"parnames"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span>
<span class="p">[</span><span class="sa">f</span><span class="s2">"par</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">problem</span><span class="o">.</span><span class="n">ub</span><span class="o">.</span><span class="n">tolist</span><span class="p">()))]</span>
<span class="p">)</span>
Expand Down
12 changes: 6 additions & 6 deletions api/_modules/aepsych/benchmark/example_problems.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">torch</span>
Expand All @@ -29,7 +29,7 @@ <h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight
<span class="n">novel_discrimination_testfun</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">aepsych.models</span> <span class="kn">import</span> <span class="n">GPClassificationModel</span>
<span class="kn">from</span> <span class="nn">aepsych.models.inducing_point_allocators</span> <span class="kn">import</span> <span class="n">KMeansAllocator</span>
<span class="kn">from</span> <span class="nn">aepsych.models.inducing_points</span> <span class="kn">import</span> <span class="n">KMeansAllocator</span>

<span class="sd">"""The DiscrimLowDim, DiscrimHighDim, ContrastSensitivity6d, and Hartmann6Binary classes</span>
<span class="sd">are copied from bernoulli_lse github repository (https://github.com/facebookresearch/bernoulli_lse)</span>
Expand Down Expand Up @@ -122,13 +122,13 @@ <h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight
<span class="p">)</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">LongTensor</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">:])</span>
<span class="n">inducing_size</span> <span class="o">=</span> <span class="mi">100</span>

<span class="c1"># Fit a model, with a large number of inducing points</span>
<span class="bp">self</span><span class="o">.</span><span class="n">m</span> <span class="o">=</span> <span class="n">GPClassificationModel</span><span class="p">(</span>
<span class="n">lb</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">ub</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
<span class="n">inducing_size</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span>
<span class="n">inducing_point_method</span><span class="o">=</span><span class="n">KMeansAllocator</span><span class="p">(</span><span class="n">bounds</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">),</span>
<span class="n">dim</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span>
<span class="n">inducing_size</span><span class="o">=</span><span class="n">inducing_size</span><span class="p">,</span>
<span class="n">inducing_point_method</span><span class="o">=</span><span class="n">KMeansAllocator</span><span class="p">(</span><span class="n">dim</span><span class="o">=</span><span class="mi">6</span><span class="p">),</span>
<span class="p">)</span>

<span class="bp">self</span><span class="o">.</span><span class="n">m</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span>
Expand Down
12 changes: 6 additions & 6 deletions api/_modules/aepsych/benchmark/example_problems/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">torch</span>
Expand All @@ -29,7 +29,7 @@ <h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight
<span class="n">novel_discrimination_testfun</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">aepsych.models</span> <span class="kn">import</span> <span class="n">GPClassificationModel</span>
<span class="kn">from</span> <span class="nn">aepsych.models.inducing_point_allocators</span> <span class="kn">import</span> <span class="n">KMeansAllocator</span>
<span class="kn">from</span> <span class="nn">aepsych.models.inducing_points</span> <span class="kn">import</span> <span class="n">KMeansAllocator</span>

<span class="sd">"""The DiscrimLowDim, DiscrimHighDim, ContrastSensitivity6d, and Hartmann6Binary classes</span>
<span class="sd">are copied from bernoulli_lse github repository (https://github.com/facebookresearch/bernoulli_lse)</span>
Expand Down Expand Up @@ -122,13 +122,13 @@ <h1>Source code for aepsych.benchmark.example_problems</h1><div class="highlight
<span class="p">)</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">LongTensor</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">:])</span>
<span class="n">inducing_size</span> <span class="o">=</span> <span class="mi">100</span>

<span class="c1"># Fit a model, with a large number of inducing points</span>
<span class="bp">self</span><span class="o">.</span><span class="n">m</span> <span class="o">=</span> <span class="n">GPClassificationModel</span><span class="p">(</span>
<span class="n">lb</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">ub</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
<span class="n">inducing_size</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span>
<span class="n">inducing_point_method</span><span class="o">=</span><span class="n">KMeansAllocator</span><span class="p">(</span><span class="n">bounds</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">bounds</span><span class="p">),</span>
<span class="n">dim</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span>
<span class="n">inducing_size</span><span class="o">=</span><span class="n">inducing_size</span><span class="p">,</span>
<span class="n">inducing_point_method</span><span class="o">=</span><span class="n">KMeansAllocator</span><span class="p">(</span><span class="n">dim</span><span class="o">=</span><span class="mi">6</span><span class="p">),</span>
<span class="p">)</span>

<span class="bp">self</span><span class="o">.</span><span class="n">m</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span>
Expand Down
Loading

0 comments on commit 3f63afc

Please sign in to comment.