Skip to content

Commit

Permalink
regenerate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jincli committed Jul 3, 2019
1 parent 38ecbca commit 2f3c99d
Show file tree
Hide file tree
Showing 418 changed files with 70,645 additions and 6,382 deletions.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.agent.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.agent.memory.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.agent.net.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.env.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.evaluator.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.experiment.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.human_eval.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.lib.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.doctree
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.dst.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.e2e.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.nlg.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.nlu.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.usr.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.modules.util.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/convlab.spec.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/modules.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/nlu.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.dialog_agent.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.dst.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.nlg.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.nlu.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.policy.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.usr.doctree
Binary file not shown.
Binary file removed docs/build/doctrees/tasktk.util.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.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: 9f94c3cb63bd71b6e2e5402fa59e1636
config: 8d4781a376070f84a925d5268ce15f35
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/build/html/.nojekyll
Empty file.
581 changes: 581 additions & 0 deletions docs/build/html/_modules/convlab/agent.html

Large diffs are not rendered by default.

499 changes: 499 additions & 0 deletions docs/build/html/_modules/convlab/agent/algorithm/actor_critic.html

Large diffs are not rendered by default.

366 changes: 366 additions & 0 deletions docs/build/html/_modules/convlab/agent/algorithm/base.html

Large diffs are not rendered by default.

547 changes: 547 additions & 0 deletions docs/build/html/_modules/convlab/agent/algorithm/dqn.html

Large diffs are not rendered by default.

261 changes: 261 additions & 0 deletions docs/build/html/_modules/convlab/agent/algorithm/external.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>convlab.agent.algorithm.external &mdash; ConvLab 0.1 documentation</title>








<script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>


<script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../../_static/language_data.js"></script>

<script type="text/javascript" src="../../../../_static/js/theme.js"></script>




<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../../../../genindex.html" />
<link rel="search" title="Search" href="../../../../search.html" />
</head>

<body class="wy-body-for-nav">


<div class="wy-grid-for-nav">

<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../../../../index.html" class="icon icon-home"> ConvLab



</a>







<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>


</div>

<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">






<!-- Local TOC -->
<div class="local-toc"></div>


</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" aria-label="top navigation">

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../../index.html">ConvLab</a>

</nav>


<div class="wy-nav-content">

<div class="rst-content">

















<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">

<li><a href="../../../../index.html">Docs</a> &raquo;</li>

<li><a href="../../../index.html">Module code</a> &raquo;</li>

<li><a href="../../agent.html">convlab.agent</a> &raquo;</li>

<li>convlab.agent.algorithm.external</li>


<li class="wy-breadcrumbs-aside">

</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for convlab.agent.algorithm.external</h1><div class="highlight"><pre>
<span></span><span class="c1"># Modified by Microsoft Corporation.</span>
<span class="c1"># Licensed under the MIT license.</span>

<span class="sd">&#39;&#39;&#39;</span>
<span class="sd">The random agent algorithm</span>
<span class="sd">For basic dev purpose.</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="kn">from</span> <span class="nn">copy</span> <span class="k">import</span> <span class="n">deepcopy</span>

<span class="kn">import</span> <span class="nn">pydash</span> <span class="k">as</span> <span class="nn">ps</span>

<span class="kn">from</span> <span class="nn">convlab.agent.algorithm</span> <span class="k">import</span> <span class="n">policy_util</span>
<span class="kn">from</span> <span class="nn">convlab.agent.algorithm.base</span> <span class="k">import</span> <span class="n">Algorithm</span>
<span class="kn">from</span> <span class="nn">convlab.lib</span> <span class="k">import</span> <span class="n">logger</span><span class="p">,</span> <span class="n">util</span>
<span class="kn">from</span> <span class="nn">convlab.lib.decorator</span> <span class="k">import</span> <span class="n">lab_api</span>
<span class="kn">from</span> <span class="nn">convlab.modules</span> <span class="k">import</span> <span class="n">policy</span><span class="p">,</span> <span class="n">word_policy</span><span class="p">,</span> <span class="n">e2e</span>

<span class="n">logger</span> <span class="o">=</span> <span class="n">logger</span><span class="o">.</span><span class="n">get_logger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>


<div class="viewcode-block" id="ExternalPolicy"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy">[docs]</a><span class="k">class</span> <span class="nc">ExternalPolicy</span><span class="p">(</span><span class="n">Algorithm</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Example Random agent that works in both discrete and continuous envs</span>
<span class="sd"> &#39;&#39;&#39;</span>

<div class="viewcode-block" id="ExternalPolicy.init_algorithm_params"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.init_algorithm_params">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">init_algorithm_params</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Initialize other algorithm parameters&#39;&#39;&#39;</span>
<span class="c1"># set default</span>
<span class="n">util</span><span class="o">.</span><span class="n">set_attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">dict</span><span class="p">(</span>
<span class="n">action_pdtype</span><span class="o">=</span><span class="s1">&#39;default&#39;</span><span class="p">,</span>
<span class="n">action_policy</span><span class="o">=</span><span class="s1">&#39;default&#39;</span><span class="p">,</span>
<span class="p">))</span>
<span class="n">util</span><span class="o">.</span><span class="n">set_attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">,</span> <span class="p">[</span>
<span class="s1">&#39;policy_name&#39;</span><span class="p">,</span>
<span class="s1">&#39;action_pdtype&#39;</span><span class="p">,</span>
<span class="s1">&#39;action_policy&#39;</span><span class="p">,</span>
<span class="p">])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">action_policy</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">policy_util</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">action_policy</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">policy</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="s1">&#39;word_policy&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">:</span>
<span class="n">params</span> <span class="o">=</span> <span class="n">deepcopy</span><span class="p">(</span><span class="n">ps</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">,</span> <span class="s1">&#39;word_policy&#39;</span><span class="p">))</span>
<span class="n">PolicyClass</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">word_policy</span><span class="p">,</span> <span class="n">params</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">))</span>
<span class="k">elif</span> <span class="s1">&#39;e2e&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">:</span>
<span class="n">params</span> <span class="o">=</span> <span class="n">deepcopy</span><span class="p">(</span><span class="n">ps</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">,</span> <span class="s1">&#39;e2e&#39;</span><span class="p">))</span>
<span class="n">PolicyClass</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">e2e</span><span class="p">,</span> <span class="n">params</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">params</span> <span class="o">=</span> <span class="n">deepcopy</span><span class="p">(</span><span class="n">ps</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">algorithm_spec</span><span class="p">,</span> <span class="s1">&#39;policy&#39;</span><span class="p">))</span>
<span class="n">PolicyClass</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">policy</span><span class="p">,</span> <span class="n">params</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">policy</span> <span class="o">=</span> <span class="n">PolicyClass</span><span class="p">(</span><span class="o">**</span><span class="n">params</span><span class="p">)</span> </div>

<div class="viewcode-block" id="ExternalPolicy.reset"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.reset">[docs]</a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">policy</span><span class="o">.</span><span class="n">init_session</span><span class="p">()</span></div>

<div class="viewcode-block" id="ExternalPolicy.init_nets"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.init_nets">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">init_nets</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">global_nets</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">pass</span></div>

<div class="viewcode-block" id="ExternalPolicy.act"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.act">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">act</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">state</span><span class="p">):</span>
<span class="n">action</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">policy</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">state</span><span class="p">)</span>
<span class="k">return</span> <span class="n">action</span></div>

<div class="viewcode-block" id="ExternalPolicy.sample"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.sample">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">sample</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">pass</span></div>

<div class="viewcode-block" id="ExternalPolicy.train"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.train">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">pass</span></div>

<div class="viewcode-block" id="ExternalPolicy.update"><a class="viewcode-back" href="../../../../convlab.agent.algorithm.html#convlab.agent.algorithm.external.ExternalPolicy.update">[docs]</a> <span class="nd">@lab_api</span>
<span class="k">def</span> <span class="nf">update</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">pass</span></div></div>
</pre></div>

</div>

</div>
<footer>


<hr/>

<div role="contentinfo">
<p>
&copy; Copyright 2019, ConvLab

</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

</div>
</div>

</section>

</div>



<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>






</body>
</html>
Loading

0 comments on commit 2f3c99d

Please sign in to comment.