Skip to content

Commit

Permalink
Deploying to gh-pages from @ 91d16f8 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
liuanji committed Feb 14, 2024
1 parent 8762fab commit e54bb2b
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 423 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/python-api/generated/pyjuice.nodes.InputNodes.doctree
Binary file not shown.
Binary file modified .doctrees/python-api/generated/pyjuice.nodes.ProdNodes.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/python-api/nodes.doctree
Binary file not shown.
21 changes: 0 additions & 21 deletions _sources/python-api/generated/pyjuice.nodes.InputNodes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,14 @@

.. autosummary::

~InputNodes._clear_tensor_circuit_hooks
~InputNodes._run_init_callbacks
~InputNodes.duplicate
~InputNodes.get_params
~InputNodes.get_source_ns
~InputNodes.has_params
~InputNodes.init_parameters
~InputNodes.is_input
~InputNodes.is_prod
~InputNodes.is_sum
~InputNodes.is_tied
~InputNodes.provided
~InputNodes.set_meta_params
~InputNodes.set_params
~InputNodes.set_source_ns





.. rubric:: Attributes

.. autosummary::

~InputNodes.DEFAULT_BLOCK_SIZE
~InputNodes.INIT_CALLBACKS
~InputNodes.num_chs
~InputNodes.num_edges
~InputNodes.num_nodes
~InputNodes.scope


25 changes: 0 additions & 25 deletions _sources/python-api/generated/pyjuice.nodes.ProdNodes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,13 @@

.. autosummary::

~ProdNodes._clear_tensor_circuit_hooks
~ProdNodes._construct_edges
~ProdNodes._run_init_callbacks
~ProdNodes.duplicate
~ProdNodes.get_source_ns
~ProdNodes.has_params
~ProdNodes.init_parameters
~ProdNodes.is_block_sparse
~ProdNodes.is_input
~ProdNodes.is_prod
~ProdNodes.is_sparse
~ProdNodes.is_sum
~ProdNodes.is_tied
~ProdNodes.provided
~ProdNodes.set_source_ns





.. rubric:: Attributes

.. autosummary::

~ProdNodes.BLOCK_SPARSE
~ProdNodes.DEFAULT_BLOCK_SIZE
~ProdNodes.INIT_CALLBACKS
~ProdNodes.SPARSE
~ProdNodes.edge_type
~ProdNodes.num_chs
~ProdNodes.num_edges
~ProdNodes.num_nodes
~ProdNodes.scope


28 changes: 0 additions & 28 deletions _sources/python-api/generated/pyjuice.nodes.SumNodes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,16 @@

.. autosummary::

~SumNodes._clear_tensor_circuit_hooks
~SumNodes._construct_edges
~SumNodes._get_edges_as_mask
~SumNodes._reorder_edges
~SumNodes._run_init_callbacks
~SumNodes._standardize_chs
~SumNodes.duplicate
~SumNodes.gather_parameters
~SumNodes.get_params
~SumNodes.get_source_ns
~SumNodes.get_zero_param_mask
~SumNodes.has_params
~SumNodes.init_parameters
~SumNodes.is_input
~SumNodes.is_prod
~SumNodes.is_sum
~SumNodes.is_tied
~SumNodes.provided
~SumNodes.set_edges
~SumNodes.set_params
~SumNodes.set_source_ns
~SumNodes.set_zero_param_mask
~SumNodes.update_param_flows
~SumNodes.update_parameters





.. rubric:: Attributes

.. autosummary::

~SumNodes.DEFAULT_BLOCK_SIZE
~SumNodes.INIT_CALLBACKS
~SumNodes.num_chs
~SumNodes.num_edges
~SumNodes.num_nodes
~SumNodes.scope


Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@
.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Bernoulli._get_constructor
~Bernoulli.bk_flow_fn
~Bernoulli.em_fn
~Bernoulli.fw_mar_fn
~Bernoulli.get_metadata
~Bernoulli.get_signature
~Bernoulli.init_meta_parameters
~Bernoulli.init_parameters
~Bernoulli.normalize_parameters
~Bernoulli.num_param_flows
~Bernoulli.num_parameters
~Bernoulli.sample_fn
~Bernoulli.set_meta_parameters




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@
.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Categorical._get_constructor
~Categorical.bk_flow_fn
~Categorical.em_fn
~Categorical.fw_mar_fn
~Categorical.get_metadata
~Categorical.get_signature
~Categorical.init_meta_parameters
~Categorical.init_parameters
~Categorical.normalize_parameters
~Categorical.num_param_flows
~Categorical.num_parameters
~Categorical.sample_fn
~Categorical.set_meta_parameters




Expand Down
81 changes: 20 additions & 61 deletions python-api/generated/pyjuice.nodes.InputNodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,81 +97,40 @@ <h1>pyjuice.nodes.InputNodes<a class="headerlink" href="#pyjuice-nodes-inputnode
<dl class="py class">
<dt class="sig sig-object py" id="pyjuice.nodes.InputNodes">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyjuice.nodes.</span></span><span class="sig-name descname"><span class="pre">InputNodes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">num_node_blocks</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">scope</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">BitSet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dist</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Distribution</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">torch.Tensor</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">block_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_no_set_meta_params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</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="headerlink" href="#pyjuice.nodes.InputNodes" title="Link to this definition"></a></dt>
<dd><dl class="py method">
<dd><p>A class representing vectors of input nodes.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>num_node_blocks</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><em>int</em></a>) – number of node blocks</p></li>
<li><p><strong>scope</strong> (<em>Union</em><em>[</em><em>Sequence</em><em>,</em><em>BitSet</em><em>]</em>) – variable scope (set of variables)</p></li>
<li><p><strong>dist</strong> (<em>Distribution</em>) – input distribution</p></li>
<li><p><strong>params</strong> (<em>Optional</em><em>[</em><em>Tensor</em><em>]</em>) – parameters of the vector of nodes</p></li>
<li><p><strong>block_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><em>int</em></a>) – block size</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyjuice.nodes.InputNodes.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">num_node_blocks</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">scope</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">BitSet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dist</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Distribution</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">torch.Tensor</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">block_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_no_set_meta_params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</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> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span></span><a class="headerlink" href="#pyjuice.nodes.InputNodes.__init__" title="Link to this definition"></a></dt>
<dd></dd></dl>

<p class="rubric">Methods</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_clear_tensor_circuit_hooks</span></code>([recursive])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_run_init_callbacks</span></code>(**kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">duplicate</span></code>([scope, tie_params])</p></td>
<td><p></p></td>
<td><p>Create a duplication of the current node with the same specification (i.e., number of nodes, block size, distribution).</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_params</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_source_ns</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">has_params</span></code>()</p></td>
<td><p></p></td>
<td><p>Get the input node parameters.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">init_parameters</span></code>([perturbation, recursive, ...])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_input</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_prod</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_sum</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_tied</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">provided</span></code>(var_name)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_meta_params</span></code>(**kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_params</span></code>(params[, normalize])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_source_ns</span></code>(source_ns)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DEFAULT_BLOCK_SIZE</span></code></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">INIT_CALLBACKS</span></code></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">num_chs</span></code></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">num_edges</span></code></p></td>
<td><p></p></td>
<td><p>Randomly initialize node parameters.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">num_nodes</span></code></p></td>
<td><p></p></td>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_meta_params</span></code>(**kwargs)</p></td>
<td><p>Set the meta-parameters such as the mask of input nodes with the <cite>MaskedCategorical</cite> distribution.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scope</span></code></p></td>
<td><p></p></td>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_params</span></code>(params[, normalize])</p></td>
<td><p>Set the input node parameters.</p></td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit e54bb2b

Please sign in to comment.