Skip to content

Commit

Permalink
Merge pull request #31 from google:20240213-fsaad-version
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 606984729
  • Loading branch information
The bayesnf Authors committed Feb 14, 2024
2 parents b5e001c + 9c1d271 commit 5c47b71
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
7 changes: 3 additions & 4 deletions docs/tutorials/BayesNF_Tutorial_on_Hungarian_Chickenpox.html
Original file line number Diff line number Diff line change
Expand Up @@ -14597,8 +14597,7 @@ <h1 id="Hungarian-Chickenpox-Tutorial">Hungarian Chickenpox Tutorial<a class="an
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Download latest version of bayesnf.</span>
<span class="o">!</span>git<span class="w"> </span>clone<span class="w"> </span>--quiet<span class="w"> </span>https://github.com/google/bayesnf
<span class="o">!</span><span class="nb">cd</span><span class="w"> </span>bayesnf<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>--quiet<span class="w"> </span>install<span class="w"> </span>.
<span class="o">!</span>pip<span class="w"> </span>install<span class="w"> </span>bayesnf
</pre></div>

</div>
Expand All @@ -14614,7 +14613,7 @@ <h1 id="Hungarian-Chickenpox-Tutorial">Hungarian Chickenpox Tutorial<a class="an
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[2]:</div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Intsall Python libraries for plotting.</span>
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Install Python libraries for plotting.</span>
<span class="o">!</span>pip<span class="w"> </span>-q<span class="w"> </span>install<span class="w"> </span>cartopy
<span class="o">!</span>pip<span class="w"> </span>-q<span class="w"> </span>install<span class="w"> </span>contextily
</pre></div>
Expand Down Expand Up @@ -15161,7 +15160,7 @@ <h2 id="Building-an-Estimator">Building an Estimator<a class="anchor-link" href=
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h2 id="Fitting-the-Estimator">Fitting the Estimator<a class="anchor-link" href="#Fitting-the-Estimator">&#182;</a></h2><p>All three estimators provide a <code>.fit</code> method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands were run on a TPU v3 with 8 cores; the compute requirements should be adjusted for the available resources.</p>
<h2 id="Fitting-the-Estimator">Fitting the Estimator<a class="anchor-link" href="#Fitting-the-Estimator">&#182;</a></h2><p>All three estimators provide a <code>.fit</code> method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands require ~120 seconds on a TPU v3-8; the <code>ensemble_size</code> and <code>num_epochs</code> values should be adjusted depending on the available resources.</p>

</div>
</div>
Expand Down
9 changes: 4 additions & 5 deletions docs/tutorials/BayesNF_Tutorial_on_Hungarian_Chickenpox.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"outputs": [],
"source": [
"# Download latest version of bayesnf.\n",
"!git clone --quiet https://github.com/google/bayesnf\n",
"!cd bayesnf && python -m pip --quiet install ."
"!pip install bayesnf"
]
},
{
Expand All @@ -37,7 +36,7 @@
},
"outputs": [],
"source": [
"# Intsall Python libraries for plotting.\n",
"# Install Python libraries for plotting.\n",
"!pip -q install cartopy\n",
"!pip -q install contextily"
]
Expand Down Expand Up @@ -526,7 +525,7 @@
"source": [
"## Fitting the Estimator\n",
"\n",
"All three estimators provide a `.fit` method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands were run on a TPU v3 with 8 cores; the compute requirements should be adjusted for the available resources."
"All three estimators provide a `.fit` method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands require ~120 seconds on a TPU v3-8; the `ensemble_size` and `num_epochs` values should be adjusted depending on the available resources."
]
},
{
Expand Down Expand Up @@ -753,7 +752,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
7 changes: 3 additions & 4 deletions docs/tutorials/BayesNF_Tutorial_on_Hungarian_Chickenpox.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ target="_blank" href="https://colab.research.google.com/github/google/bayesnf/bl

```python
# Download latest version of bayesnf.
!git clone --quiet https://github.com/google/bayesnf
!cd bayesnf && python -m pip --quiet install .
!pip install bayesnf
```


```python
# Intsall Python libraries for plotting.
# Install Python libraries for plotting.
!pip -q install cartopy
!pip -q install contextily
```
Expand Down Expand Up @@ -368,7 +367,7 @@ model = BayesianNeuralFieldMAP(

## Fitting the Estimator

All three estimators provide a `.fit` method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands were run on a TPU v3 with 8 cores; the compute requirements should be adjusted for the available resources.
All three estimators provide a `.fit` method, with slightly different signatures. The configuration below trains an ensemble comprised of 64 particles for 5000 epochs. These commands require ~120 seconds on a TPU v3-8; the `ensemble_size` and `num_epochs` values should be adjusted depending on the available resources.


```python
Expand Down
2 changes: 1 addition & 1 deletion src/bayesnf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# A new PyPI release will be pushed every time `__version__` is increased.
# When changing this, also update the CHANGELOG.md
__version__ = '0.1.1'
__version__ = '0.1.2'

from .spatiotemporal import BayesianNeuralFieldMAP
from .spatiotemporal import BayesianNeuralFieldMLE
Expand Down

0 comments on commit 5c47b71

Please sign in to comment.