From 88320999aab0c52cffc48dc41f79fe362dde7cc5 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Fri, 27 Sep 2024 12:08:37 +0100 Subject: [PATCH] Format --- .JuliaFormatter.toml | 2 ++ docs/make.jl | 6 ++---- docs/src/api.md | 38 +++++++++++++++++++------------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml index d0e00b45f..cd6a12db5 100644 --- a/.JuliaFormatter.toml +++ b/.JuliaFormatter.toml @@ -5,6 +5,8 @@ import_to_using = false # We ignore these files because when formatting was first put in place they were being worked on. # These ignores should be removed once the relevant PRs are merged/closed. ignore = [ + # Upstream issue + "docs/src/api.md", # https://github.com/TuringLang/Turing.jl/pull/2231/files "src/experimental/gibbs.jl", "src/mcmc/abstractmcmc.jl", diff --git a/docs/make.jl b/docs/make.jl index ebde41521..ba1b6990e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -22,10 +22,8 @@ makedocs(; pages=[ "Home" => "index.md", "API" => "api.md", - "Submodule APIs" => [ - "Inference" => "api/Inference.md", - "Optimisation" => "api/Optimisation.md", - ] + "Submodule APIs" => + ["Inference" => "api/Inference.md", "Optimisation" => "api/Optimisation.md"], ], checkdocs=:exports, # checkdocs_ignored_modules=[Turing, Distributions, DynamicPPL, AbstractPPL, Bijectors], diff --git a/docs/src/api.md b/docs/src/api.md index cedc35bb6..327c7f21e 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -48,25 +48,25 @@ even though [`Prior()`](@ref) is actually defined in the `Turing.Inference` modu ### Samplers -| Exported symbol | Documentation | Description | -| --- | --- | --- | -| `Prior` | [`Turing.Inference.Prior`](@ref) | Sample from the prior distribution | -| `MH` | [`Turing.Inference.MH`](@ref) | Metropolis–Hastings | -| `Emcee` | [`Turing.Inference.Emcee`](@ref) | Affine-invariant ensemble sampler | -| `ESS` | [`Turing.Inference.ESS`](@ref) | Elliptical slice sampling | -| `Gibbs` | [`Turing.Inference.Gibbs`](@ref) | Gibbs sampling | -| `GibbsConditional` | [`Turing.Inference.GibbsConditional`](@ref) | A "pseudo-sampler" to provide analytical conditionals to `Gibbs` | -| `HMC` | [`Turing.Inference.HMC`](@ref) | Hamiltonian Monte Carlo | -| `SGLD` | [`Turing.Inference.SGLD`](@ref) | Stochastic gradient Langevin dynamics | -| `SGHMC` | [`Turing.Inference.SGHMC`](@ref) | Stochastic gradient Hamiltonian Monte Carlo | -| `HMCDA` | [`Turing.Inference.HMCDA`](@ref) | Hamiltonian Monte Carlo with dual averaging | -| `NUTS` | [`Turing.Inference.NUTS`](@ref) | No-U-Turn Sampler | -| `PolynomialStepsize` | [`Turing.Inference.PolynomialStepsize`](@ref) | A function to generate a polynomially decaying step size | -| `IS` | [`Turing.Inference.IS`](@ref) | Importance sampling | -| `SMC` | [`Turing.Inference.SMC`](@ref) | Sequential Monte Carlo | -| `PG` | [`Turing.Inference.PG`](@ref) | Particle Gibbs | -| `CSMC` | [`Turing.Inference.CSMC`](@ref) | The same as PG | -| `externalsampler` | [`Turing.Inference.externalsampler`](@ref) | Wrap an external sampler for use in Turing | +| Exported symbol | Documentation | Description | +| --- | --- | --- | +| `Prior` | [`Turing.Inference.Prior`](@ref) | Sample from the prior distribution | +| `MH` | [`Turing.Inference.MH`](@ref) | Metropolis–Hastings | +| `Emcee` | [`Turing.Inference.Emcee`](@ref) | Affine-invariant ensemble sampler | +| `ESS` | [`Turing.Inference.ESS`](@ref) | Elliptical slice sampling | +| `Gibbs` | [`Turing.Inference.Gibbs`](@ref) | Gibbs sampling | +| `GibbsConditional` | [`Turing.Inference.GibbsConditional`](@ref) | A "pseudo-sampler" to provide analytical conditionals to `Gibbs` | +| `HMC` | [`Turing.Inference.HMC`](@ref) | Hamiltonian Monte Carlo | +| `SGLD` | [`Turing.Inference.SGLD`](@ref) | Stochastic gradient Langevin dynamics | +| `SGHMC` | [`Turing.Inference.SGHMC`](@ref) | Stochastic gradient Hamiltonian Monte Carlo | +| `PolynomialStepsize` | [`Turing.Inference.PolynomialStepsize`](@ref) | Returns a function which generates polynomially decaying step sizes | +| `HMCDA` | [`Turing.Inference.HMCDA`](@ref) | Hamiltonian Monte Carlo with dual averaging | +| `NUTS` | [`Turing.Inference.NUTS`](@ref) | No-U-Turn Sampler | +| `IS` | [`Turing.Inference.IS`](@ref) | Importance sampling | +| `SMC` | [`Turing.Inference.SMC`](@ref) | Sequential Monte Carlo | +| `PG` | [`Turing.Inference.PG`](@ref) | Particle Gibbs | +| `CSMC` | [`Turing.Inference.CSMC`](@ref) | The same as PG | +| `externalsampler` | [`Turing.Inference.externalsampler`](@ref) | Wrap an external sampler for use in Turing | ### Variational inference