Skip to content

Commit

Permalink
Deployed 08a3703 to dev with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 29, 2024
1 parent bd4c4dc commit e4a7933
Show file tree
Hide file tree
Showing 10 changed files with 592 additions and 584 deletions.
Binary file modified dev/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions dev/reference/_ecologits/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ <h3 id="_ecologits.EcoLogits.init" class="doc doc-heading">
<tr class="doc-section-item">
<td><code>electricity_mix_zone</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[str]</code>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
Expand Down Expand Up @@ -1848,7 +1848,7 @@ <h3 id="_ecologits.EcoLogits.init" class="doc doc-heading">
<span class="normal"><a href="#__codelineno-0-144">144</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-123"><a id="__codelineno-0-123" name="__codelineno-0-123"></a><span class="nd">@staticmethod</span>
</span><span id="__span-0-124"><a id="__codelineno-0-124" name="__codelineno-0-124"></a><span class="k">def</span> <span class="nf">init</span><span class="p">(</span>
</span><span id="__span-0-125"><a id="__codelineno-0-125" name="__codelineno-0-125"></a> <span class="n">providers</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-126"><a id="__codelineno-0-126" name="__codelineno-0-126"></a> <span class="n">electricity_mix_zone</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;WOR&quot;</span><span class="p">,</span>
</span><span id="__span-0-126"><a id="__codelineno-0-126" name="__codelineno-0-126"></a> <span class="n">electricity_mix_zone</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;WOR&quot;</span><span class="p">,</span>
</span><span id="__span-0-127"><a id="__codelineno-0-127" name="__codelineno-0-127"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-128"><a id="__codelineno-0-128" name="__codelineno-0-128"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
</span><span id="__span-0-129"><a id="__codelineno-0-129" name="__codelineno-0-129"></a><span class="sd"> Initialization static method. Will attempt to initialize all providers by default.</span>
Expand Down
1,000 changes: 504 additions & 496 deletions dev/reference/impacts/llm/index.html

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions dev/reference/impacts/modeling/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,9 @@
</li>

<li class="md-nav__item">
<a href="#impacts.modeling.Impact" class="md-nav__link">
<a href="#impacts.modeling.BaseImpact" class="md-nav__link">
<span class="md-ellipsis">
Impact
BaseImpact
</span>
</a>

Expand Down Expand Up @@ -1708,9 +1708,9 @@
</li>

<li class="md-nav__item">
<a href="#impacts.modeling.Impact" class="md-nav__link">
<a href="#impacts.modeling.BaseImpact" class="md-nav__link">
<span class="md-ellipsis">
Impact
BaseImpact
</span>
</a>

Expand Down Expand Up @@ -1830,8 +1830,8 @@ <h1>modeling</h1>



<h2 id="impacts.modeling.Impact" class="doc doc-heading">
<code>Impact</code>
<h2 id="impacts.modeling.BaseImpact" class="doc doc-heading">
<code>BaseImpact</code>


</h2>
Expand All @@ -1856,7 +1856,7 @@ <h2 id="impacts.modeling.Impact" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code><span title="impacts.modeling.Impact.type">type</span></code></td>
<td><code><span title="impacts.modeling.BaseImpact.type">type</span></code></td>
<td>
<code>str</code>
</td>
Expand All @@ -1867,7 +1867,7 @@ <h2 id="impacts.modeling.Impact" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="impacts.modeling.Impact.name">name</span></code></td>
<td><code><span title="impacts.modeling.BaseImpact.name">name</span></code></td>
<td>
<code>str</code>
</td>
Expand All @@ -1878,7 +1878,7 @@ <h2 id="impacts.modeling.Impact" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="impacts.modeling.Impact.value">value</span></code></td>
<td><code><span title="impacts.modeling.BaseImpact.value">value</span></code></td>
<td>
<code><span title="ecologits.utils.range_value.ValueOrRange">ValueOrRange</span></code>
</td>
Expand All @@ -1889,7 +1889,7 @@ <h2 id="impacts.modeling.Impact" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="impacts.modeling.Impact.unit">unit</span></code></td>
<td><code><span title="impacts.modeling.BaseImpact.unit">unit</span></code></td>
<td>
<code>str</code>
</td>
Expand Down Expand Up @@ -1936,7 +1936,7 @@ <h2 id="impacts.modeling.Energy" class="doc doc-heading">

<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.Impact" href="#impacts.modeling.Impact">Impact</a></code></p>
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.BaseImpact" href="#impacts.modeling.BaseImpact">BaseImpact</a></code></p>


<p>Energy consumption.</p>
Expand Down Expand Up @@ -2038,7 +2038,7 @@ <h2 id="impacts.modeling.GWP" class="doc doc-heading">

<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.Impact" href="#impacts.modeling.Impact">Impact</a></code></p>
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.BaseImpact" href="#impacts.modeling.BaseImpact">BaseImpact</a></code></p>


<p>Global Warming Potential (GWP) impact.</p>
Expand Down Expand Up @@ -2140,7 +2140,7 @@ <h2 id="impacts.modeling.ADPe" class="doc doc-heading">

<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.Impact" href="#impacts.modeling.Impact">Impact</a></code></p>
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.BaseImpact" href="#impacts.modeling.BaseImpact">BaseImpact</a></code></p>


<p>Abiotic Depletion Potential for Elements (ADPe) impact.</p>
Expand Down Expand Up @@ -2242,7 +2242,7 @@ <h2 id="impacts.modeling.PE" class="doc doc-heading">

<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.Impact" href="#impacts.modeling.Impact">Impact</a></code></p>
Bases: <code><a class="autorefs autorefs-internal" title="impacts.modeling.BaseImpact" href="#impacts.modeling.BaseImpact">BaseImpact</a></code></p>


<p>Primary Energy (PE) impact.</p>
Expand Down
62 changes: 31 additions & 31 deletions dev/reference/tracers/litellm_tracer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,17 @@ <h2 id="tracers.litellm_tracer.litellm_match_model" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>ecologits/tracers/litellm_tracer.py</code></summary>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-38">38</a></span>
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-28">28</a></span>
<span class="normal"><a href="#__codelineno-0-29">29</a></span>
<span class="normal"><a href="#__codelineno-0-30">30</a></span>
<span class="normal"><a href="#__codelineno-0-31">31</a></span>
<span class="normal"><a href="#__codelineno-0-32">32</a></span>
<span class="normal"><a href="#__codelineno-0-33">33</a></span>
<span class="normal"><a href="#__codelineno-0-34">34</a></span>
<span class="normal"><a href="#__codelineno-0-35">35</a></span>
<span class="normal"><a href="#__codelineno-0-36">36</a></span>
<span class="normal"><a href="#__codelineno-0-37">37</a></span>
<span class="normal"><a href="#__codelineno-0-38">38</a></span>
<span class="normal"><a href="#__codelineno-0-39">39</a></span>
<span class="normal"><a href="#__codelineno-0-40">40</a></span>
<span class="normal"><a href="#__codelineno-0-41">41</a></span>
Expand All @@ -1759,36 +1769,26 @@ <h2 id="tracers.litellm_tracer.litellm_match_model" class="doc doc-heading">
<span class="normal"><a href="#__codelineno-0-44">44</a></span>
<span class="normal"><a href="#__codelineno-0-45">45</a></span>
<span class="normal"><a href="#__codelineno-0-46">46</a></span>
<span class="normal"><a href="#__codelineno-0-47">47</a></span>
<span class="normal"><a href="#__codelineno-0-48">48</a></span>
<span class="normal"><a href="#__codelineno-0-49">49</a></span>
<span class="normal"><a href="#__codelineno-0-50">50</a></span>
<span class="normal"><a href="#__codelineno-0-51">51</a></span>
<span class="normal"><a href="#__codelineno-0-52">52</a></span>
<span class="normal"><a href="#__codelineno-0-53">53</a></span>
<span class="normal"><a href="#__codelineno-0-54">54</a></span>
<span class="normal"><a href="#__codelineno-0-55">55</a></span>
<span class="normal"><a href="#__codelineno-0-56">56</a></span>
<span class="normal"><a href="#__codelineno-0-57">57</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-38"><a id="__codelineno-0-38" name="__codelineno-0-38"></a><span class="k">def</span> <span class="nf">litellm_match_model</span><span class="p">(</span><span class="n">model_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]:</span>
</span><span id="__span-0-39"><a id="__codelineno-0-39" name="__codelineno-0-39"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
</span><span id="__span-0-40"><a id="__codelineno-0-40" name="__codelineno-0-40"></a><span class="sd"> Match according provider and model from a litellm model_name.</span>
</span><span id="__span-0-41"><a id="__codelineno-0-41" name="__codelineno-0-41"></a>
</span><span id="__span-0-42"><a id="__codelineno-0-42" name="__codelineno-0-42"></a><span class="sd"> Args:</span>
</span><span id="__span-0-43"><a id="__codelineno-0-43" name="__codelineno-0-43"></a><span class="sd"> model_name: Name of the model as used in litellm.</span>
</span><span id="__span-0-44"><a id="__codelineno-0-44" name="__codelineno-0-44"></a>
</span><span id="__span-0-45"><a id="__codelineno-0-45" name="__codelineno-0-45"></a><span class="sd"> Returns:</span>
</span><span id="__span-0-46"><a id="__codelineno-0-46" name="__codelineno-0-46"></a><span class="sd"> A tuple (provider, model_name) matching a record of the ModelRepository.</span>
</span><span id="__span-0-47"><a id="__codelineno-0-47" name="__codelineno-0-47"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-48"><a id="__codelineno-0-48" name="__codelineno-0-48"></a> <span class="n">candidate</span> <span class="o">=</span> <span class="n">process</span><span class="o">.</span><span class="n">extractOne</span><span class="p">(</span>
</span><span id="__span-0-49"><a id="__codelineno-0-49" name="__codelineno-0-49"></a> <span class="n">query</span><span class="o">=</span><span class="n">model_name</span><span class="p">,</span>
</span><span id="__span-0-50"><a id="__codelineno-0-50" name="__codelineno-0-50"></a> <span class="n">choices</span><span class="o">=</span><span class="n">_model_choices</span><span class="p">,</span>
</span><span id="__span-0-51"><a id="__codelineno-0-51" name="__codelineno-0-51"></a> <span class="n">scorer</span><span class="o">=</span><span class="n">fuzz</span><span class="o">.</span><span class="n">token_sort_ratio</span><span class="p">,</span>
</span><span id="__span-0-52"><a id="__codelineno-0-52" name="__codelineno-0-52"></a> <span class="n">score_cutoff</span><span class="o">=</span><span class="mi">51</span>
</span><span id="__span-0-53"><a id="__codelineno-0-53" name="__codelineno-0-53"></a> <span class="p">)</span>
</span><span id="__span-0-54"><a id="__codelineno-0-54" name="__codelineno-0-54"></a> <span class="k">if</span> <span class="n">candidate</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-55"><a id="__codelineno-0-55" name="__codelineno-0-55"></a> <span class="n">provider</span><span class="p">,</span> <span class="n">model_name</span> <span class="o">=</span> <span class="n">candidate</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
</span><span id="__span-0-56"><a id="__codelineno-0-56" name="__codelineno-0-56"></a> <span class="k">return</span> <span class="n">provider</span><span class="p">,</span> <span class="n">model_name</span>
</span><span id="__span-0-57"><a id="__codelineno-0-57" name="__codelineno-0-57"></a> <span class="k">return</span> <span class="kc">None</span>
<span class="normal"><a href="#__codelineno-0-47">47</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-28"><a id="__codelineno-0-28" name="__codelineno-0-28"></a><span class="k">def</span> <span class="nf">litellm_match_model</span><span class="p">(</span><span class="n">model_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]:</span>
</span><span id="__span-0-29"><a id="__codelineno-0-29" name="__codelineno-0-29"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
</span><span id="__span-0-30"><a id="__codelineno-0-30" name="__codelineno-0-30"></a><span class="sd"> Match according provider and model from a litellm model_name.</span>
</span><span id="__span-0-31"><a id="__codelineno-0-31" name="__codelineno-0-31"></a>
</span><span id="__span-0-32"><a id="__codelineno-0-32" name="__codelineno-0-32"></a><span class="sd"> Args:</span>
</span><span id="__span-0-33"><a id="__codelineno-0-33" name="__codelineno-0-33"></a><span class="sd"> model_name: Name of the model as used in litellm.</span>
</span><span id="__span-0-34"><a id="__codelineno-0-34" name="__codelineno-0-34"></a>
</span><span id="__span-0-35"><a id="__codelineno-0-35" name="__codelineno-0-35"></a><span class="sd"> Returns:</span>
</span><span id="__span-0-36"><a id="__codelineno-0-36" name="__codelineno-0-36"></a><span class="sd"> A tuple (provider, model_name) matching a record of the ModelRepository.</span>
</span><span id="__span-0-37"><a id="__codelineno-0-37" name="__codelineno-0-37"></a><span class="sd"> &quot;&quot;&quot;</span>
</span><span id="__span-0-38"><a id="__codelineno-0-38" name="__codelineno-0-38"></a> <span class="n">candidate</span> <span class="o">=</span> <span class="n">process</span><span class="o">.</span><span class="n">extractOne</span><span class="p">(</span>
</span><span id="__span-0-39"><a id="__codelineno-0-39" name="__codelineno-0-39"></a> <span class="n">query</span><span class="o">=</span><span class="n">model_name</span><span class="p">,</span>
</span><span id="__span-0-40"><a id="__codelineno-0-40" name="__codelineno-0-40"></a> <span class="n">choices</span><span class="o">=</span><span class="n">_model_choices</span><span class="p">,</span>
</span><span id="__span-0-41"><a id="__codelineno-0-41" name="__codelineno-0-41"></a> <span class="n">scorer</span><span class="o">=</span><span class="n">fuzz</span><span class="o">.</span><span class="n">token_sort_ratio</span><span class="p">,</span>
</span><span id="__span-0-42"><a id="__codelineno-0-42" name="__codelineno-0-42"></a> <span class="n">score_cutoff</span><span class="o">=</span><span class="mi">51</span>
</span><span id="__span-0-43"><a id="__codelineno-0-43" name="__codelineno-0-43"></a> <span class="p">)</span>
</span><span id="__span-0-44"><a id="__codelineno-0-44" name="__codelineno-0-44"></a> <span class="k">if</span> <span class="n">candidate</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
</span><span id="__span-0-45"><a id="__codelineno-0-45" name="__codelineno-0-45"></a> <span class="n">provider</span><span class="p">,</span> <span class="n">model_name</span> <span class="o">=</span> <span class="n">candidate</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;/&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
</span><span id="__span-0-46"><a id="__codelineno-0-46" name="__codelineno-0-46"></a> <span class="k">return</span> <span class="n">provider</span><span class="p">,</span> <span class="n">model_name</span>
</span><span id="__span-0-47"><a id="__codelineno-0-47" name="__codelineno-0-47"></a> <span class="k">return</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
</details>
</div>
Expand Down
Loading

0 comments on commit e4a7933

Please sign in to comment.