Skip to content

Commit

Permalink
deploy: 94f51d7
Browse files Browse the repository at this point in the history
  • Loading branch information
vkehfdl1 committed Dec 12, 2024
1 parent 5216afa commit e0c1ffc
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 13 deletions.
Binary file modified .doctrees/api_spec/autorag.doctree
Binary file not shown.
Binary file modified .doctrees/api_spec/autorag.nodes.passagefilter.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
3 changes: 2 additions & 1 deletion _modules/autorag/nodes/generator/vllm.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ <h1>Source code for autorag.nodes.generator.vllm</h1><div class="highlight"><pre

<span class="k">if</span> <span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">is_available</span><span class="p">():</span>
<span class="kn">from</span> <span class="nn">vllm.distributed.parallel_state</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">destroy_model_parallel</span><span class="p">,</span> <span class="n">destroy_distributed_environment</span>
<span class="n">destroy_model_parallel</span><span class="p">,</span>
<span class="n">destroy_distributed_environment</span><span class="p">,</span>
<span class="p">)</span>

<span class="n">destroy_model_parallel</span><span class="p">()</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_percentile_cutoff</h1
<span class="n">embedding_query_content</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">autorag.utils</span> <span class="kn">import</span> <span class="n">result_to_dataframe</span>
<span class="kn">from</span> <span class="nn">autorag.utils.util</span> <span class="kn">import</span> <span class="n">empty_cuda_cache</span>
<span class="kn">from</span> <span class="nn">autorag.utils.util</span> <span class="kn">import</span> <span class="n">empty_cuda_cache</span><span class="p">,</span> <span class="n">pop_params</span>


<div class="viewcode-block" id="SimilarityPercentileCutoff">
Expand All @@ -425,7 +425,7 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_percentile_cutoff</h1

<span class="sd"> :param project_dir: The project directory to use for initializing the module</span>
<span class="sd"> :param embedding_model: The embedding model string to use for calculating similarity</span>
<span class="sd"> Default is &quot;openai&quot; which is OpenAI text-embedding-ada-002 embedding model.</span>
<span class="sd"> Default is &quot;openai&quot; which is OpenAI text-embedding-ada-002 embedding model.</span>
<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">project_dir</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">embedding_model_str</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;embedding_model&quot;</span><span class="p">,</span> <span class="s2">&quot;openai&quot;</span><span class="p">)</span>
Expand All @@ -440,9 +440,10 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_percentile_cutoff</h1
<div class="viewcode-block" id="SimilarityPercentileCutoff.pure">
<a class="viewcode-back" href="../../../../api_spec/autorag.nodes.passagefilter.html#autorag.nodes.passagefilter.similarity_percentile_cutoff.SimilarityPercentileCutoff.pure">[docs]</a>
<span class="nd">@result_to_dataframe</span><span class="p">([</span><span class="s2">&quot;retrieved_contents&quot;</span><span class="p">,</span> <span class="s2">&quot;retrieved_ids&quot;</span><span class="p">,</span> <span class="s2">&quot;retrieve_scores&quot;</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">pure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">previous_result</span><span class="p">:</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">pure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">previous_result</span><span class="p">:</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">queries</span><span class="p">,</span> <span class="n">contents</span><span class="p">,</span> <span class="n">scores</span><span class="p">,</span> <span class="n">ids</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">cast_to_run</span><span class="p">(</span><span class="n">previous_result</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pure</span><span class="p">(</span><span class="n">queries</span><span class="p">,</span> <span class="n">contents</span><span class="p">,</span> <span class="n">scores</span><span class="p">,</span> <span class="n">ids</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>
<span class="n">kwargs</span> <span class="o">=</span> <span class="n">pop_params</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_pure</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pure</span><span class="p">(</span><span class="n">queries</span><span class="p">,</span> <span class="n">contents</span><span class="p">,</span> <span class="n">scores</span><span class="p">,</span> <span class="n">ids</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


<span class="k">def</span> <span class="nf">_pure</span><span class="p">(</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_threshold_cutoff</h1>
<span class="kn">from</span> <span class="nn">autorag.nodes.passagefilter.base</span> <span class="kn">import</span> <span class="n">BasePassageFilter</span>
<span class="kn">from</span> <span class="nn">autorag.utils.util</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">embedding_query_content</span><span class="p">,</span>
<span class="n">result_to_dataframe</span><span class="p">,</span>
<span class="n">empty_cuda_cache</span><span class="p">,</span>
<span class="n">result_to_dataframe</span><span class="p">,</span>
<span class="n">pop_params</span><span class="p">,</span>
<span class="p">)</span>


Expand All @@ -424,10 +425,10 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_threshold_cutoff</h1>

<span class="sd"> :param project_dir: The project directory to use for initializing the module</span>
<span class="sd"> :param embedding_model: The embedding model string to use for calculating similarity</span>
<span class="sd"> Default is &quot;openai&quot; which is OpenAI text-embedding-ada-002 embedding model.</span>
<span class="sd"> Default is &quot;openai&quot; which is OpenAI text-embedding-ada-002 embedding model.</span>
<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">project_dir</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">embedding_model_str</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;embedding_model&quot;</span><span class="p">,</span> <span class="s2">&quot;openai&quot;</span><span class="p">)</span>
<span class="n">embedding_model_str</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;embedding_model&quot;</span><span class="p">,</span> <span class="s2">&quot;openai&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">embedding_model</span> <span class="o">=</span> <span class="n">embedding_models</span><span class="p">[</span><span class="n">embedding_model_str</span><span class="p">]()</span>

<span class="k">def</span> <span class="fm">__del__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
Expand All @@ -439,6 +440,7 @@ <h1>Source code for autorag.nodes.passagefilter.similarity_threshold_cutoff</h1>
<a class="viewcode-back" href="../../../../api_spec/autorag.nodes.passagefilter.html#autorag.nodes.passagefilter.similarity_threshold_cutoff.SimilarityThresholdCutoff.pure">[docs]</a>
<span class="nd">@result_to_dataframe</span><span class="p">([</span><span class="s2">&quot;retrieved_contents&quot;</span><span class="p">,</span> <span class="s2">&quot;retrieved_ids&quot;</span><span class="p">,</span> <span class="s2">&quot;retrieve_scores&quot;</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">pure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">previous_result</span><span class="p">:</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">kwargs</span> <span class="o">=</span> <span class="n">pop_params</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_pure</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
<span class="n">queries</span><span class="p">,</span> <span class="n">contents</span><span class="p">,</span> <span class="n">scores</span><span class="p">,</span> <span class="n">ids</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">cast_to_run</span><span class="p">(</span><span class="n">previous_result</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pure</span><span class="p">(</span><span class="n">queries</span><span class="p">,</span> <span class="n">contents</span><span class="p">,</span> <span class="n">scores</span><span class="p">,</span> <span class="n">ids</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

Expand Down
4 changes: 2 additions & 2 deletions _modules/autorag/vectordb/milvus.html
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ <h1>Source code for autorag.vectordb.milvus</h1><div class="highlight"><pre>
<span class="n">user</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="n">password</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="n">timeout</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">params</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">{},</span>
<span class="n">params</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">{},</span>
<span class="p">):</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">embedding_model</span><span class="p">,</span> <span class="n">similarity_metric</span><span class="p">,</span> <span class="n">embedding_batch</span><span class="p">)</span>

Expand All @@ -453,7 +453,7 @@ <h1>Source code for autorag.vectordb.milvus</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">timeout</span> <span class="o">=</span> <span class="n">timeout</span>
<span class="bp">self</span><span class="o">.</span><span class="n">params</span> <span class="o">=</span> <span class="n">params</span>
<span class="bp">self</span><span class="o">.</span><span class="n">index_type</span> <span class="o">=</span> <span class="n">index_type</span>

<span class="c1"># Set Collection</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">utility</span><span class="o">.</span><span class="n">has_collection</span><span class="p">(</span><span class="n">collection_name</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="n">timeout</span><span class="p">):</span>
<span class="c1"># Get the dimension of the embeddings</span>
Expand Down
2 changes: 1 addition & 1 deletion api_spec/autorag.html
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

<dl class="py function">
<dt class="sig sig-object py" id="autorag.node_line.run_node_line">
<span class="sig-prename descclassname"><span class="pre">autorag.node_line.</span></span><span class="sig-name descname"><span class="pre">run_node_line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">nodes:</span> <span class="pre">~typing.List[~autorag.schema.node.Node],</span> <span class="pre">node_line_dir:</span> <span class="pre">str,</span> <span class="pre">previous_result:</span> <span class="pre">~pandas.core.frame.DataFrame</span> <span class="pre">|</span> <span class="pre">None</span> <span class="pre">=</span> <span class="pre">None,</span> <span class="pre">progress:</span> <span class="pre">~rich.progress.Progress</span> <span class="pre">=</span> <span class="pre">None,</span> <span class="pre">task_eval:</span> <span class="pre">&lt;property</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f94fe6154e0&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/autorag/node_line.html#run_node_line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#autorag.node_line.run_node_line" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">autorag.node_line.</span></span><span class="sig-name descname"><span class="pre">run_node_line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">nodes:</span> <span class="pre">~typing.List[~autorag.schema.node.Node],</span> <span class="pre">node_line_dir:</span> <span class="pre">str,</span> <span class="pre">previous_result:</span> <span class="pre">~pandas.core.frame.DataFrame</span> <span class="pre">|</span> <span class="pre">None</span> <span class="pre">=</span> <span class="pre">None,</span> <span class="pre">progress:</span> <span class="pre">~rich.progress.Progress</span> <span class="pre">=</span> <span class="pre">None,</span> <span class="pre">task_eval:</span> <span class="pre">&lt;property</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7fd405e8d5d0&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/autorag/node_line.html#run_node_line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#autorag.node_line.run_node_line" title="Link to this definition"></a></dt>
<dd><p>Run the whole node line by running each node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
Expand Down
2 changes: 1 addition & 1 deletion api_spec/autorag.nodes.passagefilter.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<dd><p>Bases: <a class="reference internal" href="#autorag.nodes.passagefilter.base.BasePassageFilter" title="autorag.nodes.passagefilter.base.BasePassageFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">BasePassageFilter</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="autorag.nodes.passagefilter.similarity_percentile_cutoff.SimilarityPercentileCutoff.pure">
<span class="sig-name descname"><span class="pre">pure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">previous_result</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/autorag/nodes/passagefilter/similarity_percentile_cutoff.html#SimilarityPercentileCutoff.pure"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#autorag.nodes.passagefilter.similarity_percentile_cutoff.SimilarityPercentileCutoff.pure" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">pure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">previous_result</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/autorag/nodes/passagefilter/similarity_percentile_cutoff.html#SimilarityPercentileCutoff.pure"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#autorag.nodes.passagefilter.similarity_percentile_cutoff.SimilarityPercentileCutoff.pure" title="Link to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit e0c1ffc

Please sign in to comment.