Skip to content

Commit

Permalink
Deploying to gh-pages from @ cf53c6d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 9, 2024
1 parent 481c5fd commit 638c9dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions _downloads/621e2c7711e8623173875c33222eddb6/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -666,3 +666,8 @@
fixed:
- Corrected logic with Simulation.check_macro_cache to prevent undesirable caching
date: 2024-09-04 21:19:20
- bump: patch
changes:
changed:
- Disable macro cache by default.
date: 2024-09-09 13:52:47
6 changes: 4 additions & 2 deletions _modules/policyengine_core/simulations/simulation.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ <h1>Source code for policyengine_core.simulations.simulation</h1><div class="hig
<span class="n">is_over_dataset</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Whether this simulation is built over a dataset.&quot;&quot;&quot;</span>

<span class="n">macro_cache_read</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">macro_cache_read</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Whether to read from the macro cache.&quot;&quot;&quot;</span>

<span class="n">macro_cache_write</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">macro_cache_write</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Whether to write to the macro cache.&quot;&quot;&quot;</span>

<span class="n">start_instant</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>
Expand Down Expand Up @@ -1658,6 +1658,8 @@ <h1>Source code for policyengine_core.simulations.simulation</h1><div class="hig
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if the variable is able to have cached value</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">macro_cache_read</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>

<span class="c1"># Dataset should always exist, but just in case</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;dataset&quot;</span><span class="p">):</span>
Expand Down
8 changes: 4 additions & 4 deletions python_api/simulations.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,13 @@ <h2>Simulation<a class="headerlink" href="#simulation" title="Permalink to this

<dl class="py attribute">
<dt class="sig sig-object py" id="policyengine_core.simulations.simulation.Simulation.macro_cache_read">
<span class="sig-name descname"><span class="pre">macro_cache_read</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#policyengine_core.simulations.simulation.Simulation.macro_cache_read" title="Permalink to this definition">#</a></dt>
<span class="sig-name descname"><span class="pre">macro_cache_read</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#policyengine_core.simulations.simulation.Simulation.macro_cache_read" title="Permalink to this definition">#</a></dt>
<dd><p>Whether to read from the macro cache.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="policyengine_core.simulations.simulation.Simulation.macro_cache_write">
<span class="sig-name descname"><span class="pre">macro_cache_write</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#policyengine_core.simulations.simulation.Simulation.macro_cache_write" title="Permalink to this definition">#</a></dt>
<span class="sig-name descname"><span class="pre">macro_cache_write</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#policyengine_core.simulations.simulation.Simulation.macro_cache_write" title="Permalink to this definition">#</a></dt>
<dd><p>Whether to write to the macro cache.</p>
</dd></dl>

Expand Down Expand Up @@ -1031,13 +1031,13 @@ <h2>Microsimulation<a class="headerlink" href="#microsimulation" title="Permalin

<dl class="py attribute">
<dt class="sig sig-object py" id="policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_read">
<span class="sig-name descname"><span class="pre">macro_cache_read</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_read" title="Permalink to this definition">#</a></dt>
<span class="sig-name descname"><span class="pre">macro_cache_read</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_read" title="Permalink to this definition">#</a></dt>
<dd><p>Whether to read from the macro cache.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_write">
<span class="sig-name descname"><span class="pre">macro_cache_write</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_write" title="Permalink to this definition">#</a></dt>
<span class="sig-name descname"><span class="pre">macro_cache_write</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#policyengine_core.simulations.microsimulation.Microsimulation.macro_cache_write" title="Permalink to this definition">#</a></dt>
<dd><p>Whether to write to the macro cache.</p>
</dd></dl>

Expand Down

0 comments on commit 638c9dd

Please sign in to comment.