Skip to content

Commit

Permalink
Merge pull request #34 from AlexImmer/install-instructions
Browse files Browse the repository at this point in the history
Improve readme on installation instructions
  • Loading branch information
aleximmer authored Jul 19, 2021
2 parents ca7943e + d1076ee commit 540a330
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ There is also a corresponding paper, [*Laplace Redux — Effortless Bayesian Dee
## Setup

We assume `python3.8` since the package was developed with that version.
To install `laplace` with `pip`, run the following:
```bash
# directly install from git
pip install laplace@git+https://github.com/AlexImmer/Laplace.git
```

For development purposes, clone the repository and then install:
```bash
# or after cloning the repository for development
pip install -r requirements.txt
# for development
pip install -e .
# for "production"
pip install .


# run tests
pip install -r tests/requirements.txt
pytest tests/
Expand Down Expand Up @@ -109,7 +112,7 @@ ml.backward()

## Documentation

The documentation is available at [here](https://aleximmer.github.io/Laplace) and can be generated and/or viewed locally:
The documentation is available [here](https://aleximmer.github.io/Laplace) or can be generated and/or viewed locally:

```bash
pip install pdoc3 matplotlib
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_extractor.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="laplace.feature_extractor.FeatureExtractor"><code class="flex name class">
<span>class <span class="ident">FeatureExtractor</span></span>
<span>(</span><span>model: torch.nn.modules.module.Module, last_layer_name: Optional[str] = None)</span>
<span>(</span><span>model: torch.nn.modules.module.Module, last_layer_name: Union[str, NoneType] = None)</span>
</code></dt>
<dd>
<div class="desc"><p>Feature extractor for a PyTorch neural network.
Expand Down
16 changes: 9 additions & 7 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ <h1 class="title">Package <code>laplace</code></h1>
}
</code></pre>
<h2 id="setup">Setup</h2>
<p>We assume <code>python3.8</code> since the package was developed with that version.</p>
<pre><code class="language-bash">pip install -r requirements.txt
<p>We assume <code>python3.8</code> since the package was developed with that version.
To install <code><a title="laplace.laplace" href="laplace.html">laplace.laplace</a></code> with <code>pip</code>, run the following:</p>
<pre><code class="language-bash"># directly install from git
pip install laplace@git+https://github.com/AlexImmer/Laplace.git
</code></pre>
<p>For development purposes, clone the repository and then install:</p>
<pre><code class="language-bash"># or after cloning the repository for development
pip install -r requirements.txt
# for development
pip install -e .
# for &quot;production&quot;
pip install .


# run tests
pip install -r tests/requirements.txt
pytest tests/
Expand Down Expand Up @@ -116,7 +118,7 @@ <h3 id="differentiating-the-log-marginal-likelihood-wrt-hyperparameters">Differe
ml.backward()
</code></pre>
<h2 id="documentation">Documentation</h2>
<p>The documentation is available at <a href="https://aleximmer.github.io/Laplace">here</a> and can be generated and/or viewed locally:</p>
<p>The documentation is available <a href="https://aleximmer.github.io/Laplace">here</a> or can be generated and/or viewed locally:</p>
<pre><code class="language-bash">pip install pdoc3 matplotlib
# create docs and write to html
bash update_docs.sh
Expand Down
Binary file modified docs/regression_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 540a330

Please sign in to comment.