-
Notifications
You must be signed in to change notification settings - Fork 162
Documentation Refactoring #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c7310d5
Documentation revision start
limarta 8043ab3
Doc changes
limarta 172e901
swap in
limarta 3f58b32
HMM example
limarta ad9760d
Serialization as an extension
limarta 3728b91
Edit docs. Add attribution
limarta dad5ec4
API listings
limarta 1c9f86e
Merge branch 'master' into doc_fix
limarta d2e5e88
Reformat code blocks
limarta 40483df
Delete docs/out.txt
limarta 9ee1e40
Remove files
limarta a722ace
Add instrutions
limarta a2db05b
Remove tutorial
limarta ef5f674
Directory changes
limarta 07117db
Fix gfi explanation code snippets. Other page fixes
limarta 0eda49a
How-to section
limarta ff26837
More how-tos
limarta 079881f
Ported SML tutorial. More directory refactoring
limarta 029ee99
Fix how to titles. Add MCMC description in API
limarta 62a69be
Added more undocumented fucntions. Edited docstrings. Minor config ch…
limarta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ julia = "1.6" | |
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] | ||
test = ["Test"] | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Gen = "ea4f424c-a589-11e8-07c0-fd5c91b9da4a" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
|
||
[compat] | ||
Documenter = "0.27" | ||
Documenter = "1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Website Docs | ||
- `pages.jl` to find skeleton of website. | ||
- `make.jl` to build the website index. | ||
|
||
The docs are divided in roughly four sections: | ||
- Getting Started + Tutorials | ||
- How-to Guides | ||
- API = Modeling API + Inference API | ||
- Explanations + Internals | ||
|
||
|
||
# Developing | ||
To build the docs, run `julia --make.jl` or alternatively startup the Julia REPL and include `make.jl`. For debugging, consider setting `draft=true` in the `makedocs` function found in `make.jl`. | ||
Currently you must write the tutorial directly in the docs rather than a source file (e.g. Quarto). See `getting_started` or `tutorials` for examples. | ||
|
||
Code snippets must use the triple backtick with a label to run. The environment carries over so long as the labels match. Example: | ||
|
||
```@example tutorial_1 | ||
x = rand() | ||
``` | ||
|
||
```@example tutorial_1 | ||
print(x) | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
pages = [ | ||
"Home" => "index.md", | ||
"Getting Started" => [ | ||
"Example 1: Linear Regression" => "getting_started/linear_regression.md", | ||
], | ||
"Tutorials" => [ | ||
"Basics" => [ | ||
"tutorials/basics/modeling_in_gen.md", | ||
"tutorials/basics/gfi.md", | ||
"tutorials/basics/combinators.md", | ||
"tutorials/basics/particle_filter.md", | ||
"tutorials/basics/vi.md", | ||
], | ||
"Advanced" => [ | ||
"tutorials/trace_translators.md", | ||
], | ||
"Model Optmizations" => [ | ||
"Speeding Inference with the Static Modeling Language" => "tutorials/model_optimizations/scaling_with_sml.md", | ||
], | ||
], | ||
"How-to Guides" => [ | ||
"MCMC Kernels" => "how_to/mcmc_kernels.md", | ||
"Custom Distributions" => "how_to/custom_distributions.md", | ||
"Custom Modeling Languages" => "how_to/custom_dsl.md", | ||
"Custom Gradients" => "how_to/custom_derivatives.md", | ||
"Incremental Computation" => "how_to/custom_incremental_computation.md", | ||
], | ||
"API Reference" => [ | ||
"Modeling Library" => [ | ||
"Generative Functions" => "api/model/gfi.md", | ||
"Probability Distributions" => "api/model/distributions.md", | ||
"Choice Maps" => "api/model/choice_maps.md", | ||
"Built-in Modeling Languages" => "api/model/modeling.md", | ||
"Combinators" => "api/model/combinators.md", | ||
"Selections" => "api/model/selections.md", | ||
"Optimizing Trainable Parameters" => "api/model/parameter_optimization.md", | ||
"Trace Translators" => "api/model/trace_translators.md", | ||
], | ||
"Inference Library" => [ | ||
"Importance Sampling" => "api/inference/importance.md", | ||
"MAP Optimization" => "api/inference/map.md", | ||
"Markov chain Monte Carlo" => "api/inference/mcmc.md", | ||
"MAP Optimization" => "api/inference/map.md", | ||
"Particle Filtering" => "api/inference/pf.md", | ||
"Variational Inference" => "api/inference/vi.md", | ||
"Learning Generative Functions" => "api/inference/learning.md" | ||
], | ||
], | ||
"Explanation and Internals" => [ | ||
"Modeling Language Implementation" => "explanations/language_implementation.md", | ||
"explanations/combinator_design.md" | ||
] | ||
] |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Markov chain Monte Carlo (MCMC) | ||
|
||
Gen supports standard Markov Chain Monte Carlo algorithms and allows users to write their own custom kernels. | ||
```@index | ||
Pages = ["mcmc.md"] | ||
``` | ||
|
||
```@docs | ||
metropolis_hastings | ||
mh | ||
mala | ||
hmc | ||
elliptical_slice | ||
@pkern | ||
@kern | ||
@rkern | ||
reversal | ||
involutive_mcmc | ||
``` |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Variational inference | ||
There are two procedures in the inference library for performing black box variational inference. | ||
Each of these procedures can also train the model using stochastic gradient descent, as in a variational autoencoder. | ||
```@docs | ||
black_box_vi! | ||
black_box_vimco! | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
## [Generative Functions](@id gfi_api) | ||
|
||
```@docs | ||
GenerativeFunction | ||
Trace | ||
``` | ||
|
||
The complete set of methods in the generative function interface (GFI) is: | ||
|
||
```@docs | ||
simulate | ||
generate | ||
update | ||
regenerate | ||
get_args | ||
get_retval | ||
get_choices | ||
get_score | ||
get_gen_fn | ||
Base.getindex | ||
project | ||
propose | ||
assess | ||
has_argument_grads | ||
has_submap | ||
accepts_output_grad | ||
accumulate_param_gradients! | ||
choice_gradients | ||
get_params | ||
``` | ||
|
||
```@docs | ||
Diff | ||
NoChange | ||
UnknownChange | ||
SetDiff | ||
Diffed | ||
``` | ||
|
||
```@docs | ||
CustomUpdateGF | ||
apply_with_state | ||
update_with_state | ||
``` | ||
|
||
```@docs | ||
CustomGradientGF | ||
apply | ||
gradient | ||
``` | ||
|
||
```@docs | ||
Gen.init_update_state | ||
Gen.apply_update! | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the sort of whitespace change it's nice to not include in a code review...