diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 1d01f8a88..bfe2d10f9 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -10,7 +10,6 @@ concurrency: group: docs permissions: - actions: write contents: write pull-requests: write @@ -31,6 +30,9 @@ jobs: - name: Load Julia packages from cache uses: julia-actions/cache@v2 + with: + cache-name: julia-cache;${{ hashFiles('**/Manifest.toml') }} + delete-old-caches: false # Note: needs resolve() to fix #518 - name: Instantiate Julia environment diff --git a/_quarto.yml b/_quarto.yml index 613e9b87f..f83d6620b 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -20,9 +20,9 @@ website: background: "#073c44" foreground: "#ffffff" left: - - href: tutorials/docs-00-getting-started/ + - href: getting-started/ text: Get Started - - href: tutorials/00-introduction/ + - href: tutorials/coin-flipping/ text: Tutorials - href: https://turinglang.org/library/ text: Libraries @@ -50,52 +50,40 @@ website: - text: documentation collapse-level: 1 contents: - - section: "Users" - # href: tutorials/index.qmd, This page will be added later so keep this line commented - contents: - - tutorials/docs-00-getting-started/index.qmd - - tutorials/docs-12-using-turing-guide/index.qmd + - getting-started/index.qmd + - core-functionality/index.qmd - - section: "Usage Tips" - collapse-level: 1 - contents: - - tutorials/docs-10-using-turing-autodiff/index.qmd - - tutorials/usage-custom-distribution/index.qmd - - tutorials/usage-probability-interface/index.qmd - - tutorials/usage-modifying-logprob/index.qmd - - tutorials/usage-generated-quantities/index.qmd - - tutorials/docs-17-mode-estimation/index.qmd - - tutorials/docs-13-using-turing-performance-tips/index.qmd - - tutorials/docs-15-using-turing-sampler-viz/index.qmd - - tutorials/docs-11-using-turing-dynamichmc/index.qmd - - tutorials/docs-16-using-turing-external-samplers/index.qmd - - - section: "Tutorials" - contents: - - tutorials/00-introduction/index.qmd - - text: Gaussian Mixture Models - href: tutorials/01-gaussian-mixture-model/index.qmd - - tutorials/02-logistic-regression/index.qmd - - tutorials/03-bayesian-neural-network/index.qmd - - text: Hidden Markov Models - href: tutorials/04-hidden-markov-model/index.qmd - - tutorials/05-linear-regression/index.qmd - - text: Infinite Mixture Model - href: tutorials/06-infinite-mixture-model/index.qmd - - tutorials/07-poisson-regression/index.qmd - - text: Multinomial Logistic Regression - href: tutorials/08-multinomial-logistic-regression/index.qmd - - text: Variational Inference - href: tutorials/09-variational-inference/index.qmd - - text: "Bayesian Differential Equations" - href: tutorials/10-bayesian-differential-equations/index.qmd - - text: "Probabilistic PCA" - href: tutorials/11-probabilistic-pca/index.qmd - - tutorials/13-seasonal-time-series/index.qmd - - text: "Introduction to Gaussian Processes" - href: tutorials/15-gaussian-processes/index.qmd - - text: "Gaussian Process Latent Variable Models" - href: tutorials/12-gplvm/index.qmd + - section: "Usage Tips" + collapse-level: 1 + contents: + - usage/automatic-differentiation/index.qmd + - usage/custom-distribution/index.qmd + - usage/probability-interface/index.qmd + - usage/modifying-logprob/index.qmd + - usage/generated-quantities/index.qmd + - usage/mode-estimation/index.qmd + - usage/performance-tips/index.qmd + - usage/sampler-visualisation/index.qmd + - usage/dynamichmc/index.qmd + - usage/external-samplers/index.qmd + + - section: "Tutorials" + contents: + - tutorials/coin-flipping/index.qmd + - tutorials/gaussian-mixture-models/index.qmd + - tutorials/bayesian-logistic-regression/index.qmd + - tutorials/bayesian-neural-networks/index.qmd + - tutorials/hidden-markov-models/index.qmd + - tutorials/bayesian-linear-regression/index.qmd + - tutorials/infinite-mixture-models/index.qmd + - tutorials/bayesian-poisson-regression/index.qmd + - tutorials/multinomial-logistic-regression/index.qmd + - tutorials/variational-inference/index.qmd + - tutorials/bayesian-differential-equations/index.qmd + - tutorials/probabilistic-pca/index.qmd + - tutorials/bayesian-time-series-analysis/index.qmd + - tutorials/gaussian-processes-introduction/index.qmd + - tutorials/gaussian-process-latent-variable-models/index.qmd - section: "Developers" contents: @@ -144,13 +132,26 @@ format: light: cosmo dark: [cosmo, theming/theme-dark.scss] css: theming/styles.css - toc: true smooth-scroll: true - code-overflow: wrap output-block-background: true - + toc: true + toc-title: "Table of Contents" + code-fold: false + code-overflow: scroll execute: + echo: true + output: true freeze: auto +include-in-header: + - text: | + # These variables can be used in any qmd files, e.g. for links: # the [Getting Started page]({{< meta get-started >}}) diff --git a/tutorials/docs-12-using-turing-guide/index.qmd b/core-functionality/index.qmd similarity index 99% rename from tutorials/docs-12-using-turing-guide/index.qmd rename to core-functionality/index.qmd index 0be627e3d..40fb84600 100755 --- a/tutorials/docs-12-using-turing-guide/index.qmd +++ b/core-functionality/index.qmd @@ -1,6 +1,8 @@ --- title: "Core Functionality" engine: julia +aliases: + - ../tutorials/docs-12-using-turing-guide/index.html --- ```{julia} diff --git a/tutorials/docs-00-getting-started/index.qmd b/getting-started/index.qmd similarity index 97% rename from tutorials/docs-00-getting-started/index.qmd rename to getting-started/index.qmd index eb97dede3..7f3989acd 100644 --- a/tutorials/docs-00-getting-started/index.qmd +++ b/getting-started/index.qmd @@ -2,7 +2,8 @@ title: Getting Started engine: julia aliases: - - ../../ + - ../tutorials/docs-00-getting-started/index.html + - ../index.html --- ```{julia} diff --git a/tutorials/_metadata.yml b/tutorials/_metadata.yml deleted file mode 100755 index 3956cf9c8..000000000 --- a/tutorials/_metadata.yml +++ /dev/null @@ -1,18 +0,0 @@ -format: - html: - toc-title: "Table of Contents" - code-fold: false - code-overflow: scroll -execute: - echo: true - output: true -include-in-header: - - text: | - diff --git a/tutorials/10-bayesian-differential-equations/index.qmd b/tutorials/bayesian-differential-equations/index.qmd similarity index 99% rename from tutorials/10-bayesian-differential-equations/index.qmd rename to tutorials/bayesian-differential-equations/index.qmd index a43bc3e8f..30d6c3de3 100755 --- a/tutorials/10-bayesian-differential-equations/index.qmd +++ b/tutorials/bayesian-differential-equations/index.qmd @@ -1,6 +1,8 @@ --- -title: Bayesian Estimation of Differential Equations +title: Bayesian Differential Equations engine: julia +aliases: + - ../10-bayesian-differential-equations/index.html --- ```{julia} diff --git a/tutorials/05-linear-regression/index.qmd b/tutorials/bayesian-linear-regression/index.qmd similarity index 99% rename from tutorials/05-linear-regression/index.qmd rename to tutorials/bayesian-linear-regression/index.qmd index 7c5111f7e..c28148371 100755 --- a/tutorials/05-linear-regression/index.qmd +++ b/tutorials/bayesian-linear-regression/index.qmd @@ -1,6 +1,8 @@ --- -title: Linear Regression +title: Bayesian Linear Regression engine: julia +aliases: + - ../05-linear-regression/index.html --- ```{julia} diff --git a/tutorials/02-logistic-regression/index.qmd b/tutorials/bayesian-logistic-regression/index.qmd similarity index 99% rename from tutorials/02-logistic-regression/index.qmd rename to tutorials/bayesian-logistic-regression/index.qmd index 7594e0ea2..bfa4e68fc 100755 --- a/tutorials/02-logistic-regression/index.qmd +++ b/tutorials/bayesian-logistic-regression/index.qmd @@ -1,6 +1,8 @@ --- title: Bayesian Logistic Regression engine: julia +aliases: + - ../02-logistic-regression/index.html --- ```{julia} @@ -271,4 +273,4 @@ end The above shows that with a threshold of 0.07, we correctly predict a respectable portion of the defaults, and correctly identify most non-defaults. This is fairly sensitive to a choice of threshold, and you may wish to experiment with it. -This tutorial has demonstrated how to use Turing to perform Bayesian logistic regression. \ No newline at end of file +This tutorial has demonstrated how to use Turing to perform Bayesian logistic regression. diff --git a/tutorials/03-bayesian-neural-network/index.qmd b/tutorials/bayesian-neural-networks/index.qmd similarity index 99% rename from tutorials/03-bayesian-neural-network/index.qmd rename to tutorials/bayesian-neural-networks/index.qmd index 133e83cc8..68b67f439 100755 --- a/tutorials/03-bayesian-neural-network/index.qmd +++ b/tutorials/bayesian-neural-networks/index.qmd @@ -1,6 +1,8 @@ --- title: Bayesian Neural Networks engine: julia +aliases: + - ../03-bayesian-neural-network/index.html --- ```{julia} diff --git a/tutorials/07-poisson-regression/index.qmd b/tutorials/bayesian-poisson-regression/index.qmd similarity index 99% rename from tutorials/07-poisson-regression/index.qmd rename to tutorials/bayesian-poisson-regression/index.qmd index f2e233376..e8e51cb1a 100755 --- a/tutorials/07-poisson-regression/index.qmd +++ b/tutorials/bayesian-poisson-regression/index.qmd @@ -1,6 +1,8 @@ --- title: Bayesian Poisson Regression engine: julia +aliases: + - ../07-poisson-regression/index.html --- ```{julia} diff --git a/tutorials/13-seasonal-time-series/index.qmd b/tutorials/bayesian-time-series-analysis/index.qmd similarity index 99% rename from tutorials/13-seasonal-time-series/index.qmd rename to tutorials/bayesian-time-series-analysis/index.qmd index 4d3545f5c..3f722dcaf 100755 --- a/tutorials/13-seasonal-time-series/index.qmd +++ b/tutorials/bayesian-time-series-analysis/index.qmd @@ -1,6 +1,8 @@ --- title: Bayesian Time Series Analysis engine: julia +aliases: + - ../13-seasonal-time-series/index.html --- ```{julia} diff --git a/tutorials/00-introduction/index.qmd b/tutorials/coin-flipping/index.qmd similarity index 99% rename from tutorials/00-introduction/index.qmd rename to tutorials/coin-flipping/index.qmd index ac4f981b2..757525249 100755 --- a/tutorials/00-introduction/index.qmd +++ b/tutorials/coin-flipping/index.qmd @@ -2,7 +2,8 @@ title: "Introduction: Coin Flipping" engine: julia aliases: - - ../ + - ../00-introduction/index.html + - ../00-introduction/ --- ```{julia} diff --git a/tutorials/docs-08-using-turing/index.qmd b/tutorials/docs-08-using-turing/index.qmd deleted file mode 100644 index 48eba07ce..000000000 --- a/tutorials/docs-08-using-turing/index.qmd +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Turing Documentation ---- - -# Turing Documentation - -Welcome to the documentation for Turing. Turing is a general-purpose probabilistic programming language for robust, -efficient Bayesian inference and decision making. Current features include: - - - General-purpose probabilistic programming with an intuitive modelling interface; - - Robust, efficient [Hamiltonian Monte Carlo (HMC)](https://github.com/TuringLang/AdvancedHMC.jl) sampling for differentiable posterior distributions; - - Particle MCMC sampling for complex posterior distributions involving discrete variables and stochastic control flow; and - - Gibbs sampling that combines particle MCMC, HMC and random-walk MH (RWMH) etc. \ No newline at end of file diff --git a/tutorials/docs-09-using-turing-advanced/index.qmd b/tutorials/docs-09-using-turing-advanced/index.qmd deleted file mode 100755 index c526e87e4..000000000 --- a/tutorials/docs-09-using-turing-advanced/index.qmd +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Advanced Usage -engine: julia ---- - -This page has been separated into new sections. Please update any bookmarks you might have: - - - [Custom Distributions]({{< meta usage-custom-distribution >}}) - - [Modifying the Log Probability]({{< meta usage-modifying-logprob >}}) - - [Defining a Model without `@model`]({{< meta dev-model-manual >}}) - - [Reparametrization and Generated Quantities]({{< meta usage-generated-quantities >}}) diff --git a/tutorials/01-gaussian-mixture-model/index.qmd b/tutorials/gaussian-mixture-models/index.qmd similarity index 98% rename from tutorials/01-gaussian-mixture-model/index.qmd rename to tutorials/gaussian-mixture-models/index.qmd index 68bda2b37..cff91d1eb 100755 --- a/tutorials/01-gaussian-mixture-model/index.qmd +++ b/tutorials/gaussian-mixture-models/index.qmd @@ -1,6 +1,8 @@ --- -title: Unsupervised Learning using Bayesian Mixture Models +title: Gaussian Mixture Models engine: julia +aliases: + - ../01-gaussian-mixture-model/index.html --- ```{julia} @@ -10,7 +12,7 @@ using Pkg; Pkg.instantiate(); ``` -The following tutorial illustrates the use of Turing for clustering data using a Bayesian mixture model. +The following tutorial illustrates the use of Turing for an unsupervised task, namely, clustering data using a Bayesian mixture model. The aim of this task is to infer a latent grouping (hidden structure) from unlabelled data. ## Synthetic Data diff --git a/tutorials/12-gplvm/index.qmd b/tutorials/gaussian-process-latent-variable-models/index.qmd similarity index 98% rename from tutorials/12-gplvm/index.qmd rename to tutorials/gaussian-process-latent-variable-models/index.qmd index 387637ad4..e6a9c3f62 100755 --- a/tutorials/12-gplvm/index.qmd +++ b/tutorials/gaussian-process-latent-variable-models/index.qmd @@ -1,6 +1,8 @@ --- -title: Gaussian Process Latent Variable Model +title: Gaussian Process Latent Variable Models engine: julia +aliases: + - ../12-gplvm/index.html --- ```{julia} @@ -231,4 +233,4 @@ let end ``` -Now, the split between the two groups is visible again. \ No newline at end of file +Now, the split between the two groups is visible again. diff --git a/tutorials/15-gaussian-processes/index.qmd b/tutorials/gaussian-processes-introduction/index.qmd similarity index 98% rename from tutorials/15-gaussian-processes/index.qmd rename to tutorials/gaussian-processes-introduction/index.qmd index 3a3c86e8d..33389b556 100755 --- a/tutorials/15-gaussian-processes/index.qmd +++ b/tutorials/gaussian-processes-introduction/index.qmd @@ -1,6 +1,8 @@ --- -title: Gaussian Processes +title: "Gaussian Processes: Introduction" engine: julia +aliases: + - ../15-gaussian-processes/index.html --- ```{julia} diff --git a/tutorials/04-hidden-markov-model/index.qmd b/tutorials/hidden-markov-models/index.qmd similarity index 99% rename from tutorials/04-hidden-markov-model/index.qmd rename to tutorials/hidden-markov-models/index.qmd index ae9148273..9e1255932 100755 --- a/tutorials/04-hidden-markov-model/index.qmd +++ b/tutorials/hidden-markov-models/index.qmd @@ -1,6 +1,8 @@ --- -title: Bayesian Hidden Markov Models +title: Hidden Markov Models engine: julia +aliases: + - ../04-hidden-markov-model/index.html --- ```{julia} diff --git a/tutorials/06-infinite-mixture-model/index.qmd b/tutorials/infinite-mixture-models/index.qmd similarity index 99% rename from tutorials/06-infinite-mixture-model/index.qmd rename to tutorials/infinite-mixture-models/index.qmd index 8ed264f3d..3969ac576 100755 --- a/tutorials/06-infinite-mixture-model/index.qmd +++ b/tutorials/infinite-mixture-models/index.qmd @@ -1,6 +1,8 @@ --- -title: Probabilistic Modelling using the Infinite Mixture Model +title: Infinite Mixture Models engine: julia +aliases: + - ../06-infinite-mixture-model/index.html --- ```{julia} diff --git a/tutorials/08-multinomial-logistic-regression/index.qmd b/tutorials/multinomial-logistic-regression/index.qmd similarity index 98% rename from tutorials/08-multinomial-logistic-regression/index.qmd rename to tutorials/multinomial-logistic-regression/index.qmd index 216598c1c..94c964bd1 100755 --- a/tutorials/08-multinomial-logistic-regression/index.qmd +++ b/tutorials/multinomial-logistic-regression/index.qmd @@ -1,6 +1,8 @@ --- -title: Bayesian Multinomial Logistic Regression +title: Multinomial Logistic Regression engine: julia +aliases: + - ../08-multinomial-logistic-regression/index.html --- ```{julia} diff --git a/tutorials/11-probabilistic-pca/index.qmd b/tutorials/probabilistic-pca/index.qmd similarity index 99% rename from tutorials/11-probabilistic-pca/index.qmd rename to tutorials/probabilistic-pca/index.qmd index 83c4923cb..74fc011f5 100755 --- a/tutorials/11-probabilistic-pca/index.qmd +++ b/tutorials/probabilistic-pca/index.qmd @@ -1,6 +1,8 @@ --- -title: Probabilistic Principal Component Analysis (p-PCA) +title: Probabilistic PCA engine: julia +aliases: + - ../11-probabilistic-pca/index.html --- ```{julia} diff --git a/tutorials/09-variational-inference/index.qmd b/tutorials/variational-inference/index.qmd similarity index 99% rename from tutorials/09-variational-inference/index.qmd rename to tutorials/variational-inference/index.qmd index 5ec412163..ebbe7b467 100755 --- a/tutorials/09-variational-inference/index.qmd +++ b/tutorials/variational-inference/index.qmd @@ -1,6 +1,8 @@ --- -title: Variational inference (VI) in Turing.jl +title: Variational Inference engine: julia +aliases: + - ../09-variational-inference/index.html --- ```{julia} diff --git a/tutorials/docs-10-using-turing-autodiff/index.qmd b/usage/automatic-differentiation/index.qmd similarity index 98% rename from tutorials/docs-10-using-turing-autodiff/index.qmd rename to usage/automatic-differentiation/index.qmd index b46bb2beb..b5d218d8f 100755 --- a/tutorials/docs-10-using-turing-autodiff/index.qmd +++ b/usage/automatic-differentiation/index.qmd @@ -1,6 +1,8 @@ --- title: Automatic Differentiation engine: julia +aliases: + - ../../tutorials/docs-10-using-turing-autodiff/index.html --- ```{julia} diff --git a/tutorials/usage-custom-distribution/index.qmd b/usage/custom-distribution/index.qmd similarity index 96% rename from tutorials/usage-custom-distribution/index.qmd rename to usage/custom-distribution/index.qmd index 2ff1844c1..f28eab9b0 100755 --- a/tutorials/usage-custom-distribution/index.qmd +++ b/usage/custom-distribution/index.qmd @@ -1,6 +1,9 @@ --- title: Custom Distributions engine: julia +aliases: + - ../../tutorials/usage-custom-distribution/index.html + - ../../tutorials/docs-09-using-turing-advanced/index.html --- ```{julia} diff --git a/tutorials/docs-11-using-turing-dynamichmc/index.qmd b/usage/dynamichmc/index.qmd similarity index 92% rename from tutorials/docs-11-using-turing-dynamichmc/index.qmd rename to usage/dynamichmc/index.qmd index 8802f5c3d..8b76db9ce 100755 --- a/tutorials/docs-11-using-turing-dynamichmc/index.qmd +++ b/usage/dynamichmc/index.qmd @@ -1,6 +1,8 @@ --- title: Using DynamicHMC engine: julia +aliases: + - ../../tutorials/docs-11-using-turing-dynamichmc/index.html --- ```{julia} @@ -33,4 +35,4 @@ end # Pull 2,000 samples using DynamicNUTS. dynamic_nuts = externalsampler(DynamicHMC.NUTS()) chn = sample(gdemo(1.5, 2.0), dynamic_nuts, 2000, progress=false) -``` \ No newline at end of file +``` diff --git a/tutorials/docs-16-using-turing-external-samplers/index.qmd b/usage/external-samplers/index.qmd similarity index 99% rename from tutorials/docs-16-using-turing-external-samplers/index.qmd rename to usage/external-samplers/index.qmd index a5362bed9..850a776ab 100755 --- a/tutorials/docs-16-using-turing-external-samplers/index.qmd +++ b/usage/external-samplers/index.qmd @@ -1,6 +1,8 @@ --- title: Using External Samplers engine: julia +aliases: + - ../../tutorials/docs-16-using-turing-external-samplers/index.html --- ```{julia} diff --git a/tutorials/usage-generated-quantities/index.qmd b/usage/generated-quantities/index.qmd similarity index 96% rename from tutorials/usage-generated-quantities/index.qmd rename to usage/generated-quantities/index.qmd index 09db59d7d..c702e215e 100755 --- a/tutorials/usage-generated-quantities/index.qmd +++ b/usage/generated-quantities/index.qmd @@ -1,6 +1,8 @@ --- title: Generated Quantities engine: julia +aliases: + - ../../tutorials/usage-generated-quantities/index.html --- ```{julia} diff --git a/tutorials/docs-17-mode-estimation/index.qmd b/usage/mode-estimation/index.qmd similarity index 98% rename from tutorials/docs-17-mode-estimation/index.qmd rename to usage/mode-estimation/index.qmd index 6319219a6..02607c6a8 100755 --- a/tutorials/docs-17-mode-estimation/index.qmd +++ b/usage/mode-estimation/index.qmd @@ -1,6 +1,8 @@ --- title: Mode Estimation engine: julia +aliases: + - ../../tutorials/docs-17-mode-estimation/index.html --- ```{julia} diff --git a/tutorials/usage-modifying-logprob/index.qmd b/usage/modifying-logprob/index.qmd similarity index 96% rename from tutorials/usage-modifying-logprob/index.qmd rename to usage/modifying-logprob/index.qmd index cb71789d2..b44776b51 100755 --- a/tutorials/usage-modifying-logprob/index.qmd +++ b/usage/modifying-logprob/index.qmd @@ -1,6 +1,8 @@ --- title: Modifying the Log Probability engine: julia +aliases: + - ../../tutorials/usage-modifying-logprob/index.html --- ```{julia} diff --git a/tutorials/docs-13-using-turing-performance-tips/index.qmd b/usage/performance-tips/index.qmd similarity index 98% rename from tutorials/docs-13-using-turing-performance-tips/index.qmd rename to usage/performance-tips/index.qmd index 241deb989..d5a26a029 100755 --- a/tutorials/docs-13-using-turing-performance-tips/index.qmd +++ b/usage/performance-tips/index.qmd @@ -1,6 +1,8 @@ --- title: Performance Tips engine: julia +aliases: + - ../../tutorials/docs-13-using-turing-performance-tips/index.html --- ```{julia} diff --git a/tutorials/usage-probability-interface/index.qmd b/usage/probability-interface/index.qmd similarity index 98% rename from tutorials/usage-probability-interface/index.qmd rename to usage/probability-interface/index.qmd index 2e5ecfe2b..6d1b8d210 100644 --- a/tutorials/usage-probability-interface/index.qmd +++ b/usage/probability-interface/index.qmd @@ -1,6 +1,8 @@ --- title: Querying Model Probabilities engine: julia +aliases: + - ../../tutorials/usage-probability-interface/index.html --- ```{julia} diff --git a/tutorials/docs-15-using-turing-sampler-viz/index.qmd b/usage/sampler-visualisation/index.qmd similarity index 98% rename from tutorials/docs-15-using-turing-sampler-viz/index.qmd rename to usage/sampler-visualisation/index.qmd index 9b31eab8b..379caf343 100755 --- a/tutorials/docs-15-using-turing-sampler-viz/index.qmd +++ b/usage/sampler-visualisation/index.qmd @@ -1,6 +1,8 @@ --- title: Sampler Visualization engine: julia +aliases: + - ../../tutorials/docs-15-using-turing-sampler-viz/index.html --- ```{julia}