Skip to content

Commit

Permalink
deploy: ba1098b
Browse files Browse the repository at this point in the history
  • Loading branch information
jduerholt committed Aug 16, 2024
1 parent e520d55 commit f6dfa34
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
2 changes: 2 additions & 0 deletions ref-domain-util/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4045,6 +4045,8 @@ <h3 id="bofire.utils.torch_tools.get_interpoint_constraints" class="doc doc-head
<span class="sd"> of a tensor with the feature indices, coefficients and a float for the rhs.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">constraints</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">if</span> <span class="n">n_candidates</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">return</span> <span class="n">constraints</span>
<span class="k">for</span> <span class="n">constraint</span> <span class="ow">in</span> <span class="n">domain</span><span class="o">.</span><span class="n">constraints</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">InterpointEqualityConstraint</span><span class="p">):</span>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">constraint</span><span class="p">,</span> <span class="n">InterpointEqualityConstraint</span><span class="p">)</span>
<span class="n">coefficients</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="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.0</span><span class="p">])</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="o">**</span><span class="n">tkwargs</span><span class="p">)</span>
Expand Down
6 changes: 6 additions & 0 deletions ref-domain/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,9 @@ <h2 id="bofire.data_models.domain.domain.Domain" class="doc doc-heading">
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">c</span><span class="o">.</span><span class="n">features</span><span class="p">:</span> <span class="c1"># type: ignore</span>
<span class="k">if</span> <span class="n">f</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;feature </span><span class="si">{</span><span class="n">f</span><span class="si">}</span><span class="s2"> in constraint unknown (</span><span class="si">{</span><span class="n">keys</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">constraints</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">InterpointEqualityConstraint</span><span class="p">):</span>
<span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">feature</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;feature </span><span class="si">{</span><span class="n">c</span><span class="o">.</span><span class="n">feature</span><span class="si">}</span><span class="s2"> not known.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span>

<span class="nd">@model_validator</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s2">&quot;after&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2090,6 +2093,9 @@ <h3 id="bofire.data_models.domain.domain.Domain.validate_constraints" class="doc
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">c</span><span class="o">.</span><span class="n">features</span><span class="p">:</span> <span class="c1"># type: ignore</span>
<span class="k">if</span> <span class="n">f</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;feature </span><span class="si">{</span><span class="n">f</span><span class="si">}</span><span class="s2"> in constraint unknown (</span><span class="si">{</span><span class="n">keys</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">constraints</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">InterpointEqualityConstraint</span><span class="p">):</span>
<span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">feature</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;feature </span><span class="si">{</span><span class="n">c</span><span class="o">.</span><span class="n">feature</span><span class="si">}</span><span class="s2"> not known.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span>
</code></pre></div>
</details>
Expand Down
2 changes: 2 additions & 0 deletions ref-utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4043,6 +4043,8 @@ <h3 id="bofire.utils.torch_tools.get_interpoint_constraints" class="doc doc-head
<span class="sd"> of a tensor with the feature indices, coefficients and a float for the rhs.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">constraints</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">if</span> <span class="n">n_candidates</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">return</span> <span class="n">constraints</span>
<span class="k">for</span> <span class="n">constraint</span> <span class="ow">in</span> <span class="n">domain</span><span class="o">.</span><span class="n">constraints</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">InterpointEqualityConstraint</span><span class="p">):</span>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">constraint</span><span class="p">,</span> <span class="n">InterpointEqualityConstraint</span><span class="p">)</span>
<span class="n">coefficients</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="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.0</span><span class="p">])</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="o">**</span><span class="n">tkwargs</span><span class="p">)</span>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,87 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://experimental-design.github.io/bofire/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/basic_examples/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/data_models_functionals/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/design_with_explicit_formula/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/examples/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/fractional_factorial/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/getting_started/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/install/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/nchoosek_constraint/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/optimality_criteria/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-constraints/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-domain-util/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-domain/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-features/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-objectives/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/ref-utils/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://experimental-design.github.io/bofire/userguide_surrogates/</loc>
<lastmod>2024-08-13</lastmod>
<lastmod>2024-08-16</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit f6dfa34

Please sign in to comment.