Skip to content

Commit 730d1b1

Browse files
committed
tutorial on using gpu and LUX
and setup quarto project
1 parent 5996128 commit 730d1b1

38 files changed

+5434
-23
lines changed

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/

docs/_quarto.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
project:
2+
title: "HybridVariationInference documentation"
3+
render:
4+
- src/tutorials/basic_cpu.qmd
5+
- src/tutorials/*.qmd
6+
7+
8+
9+

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ makedocs(;
2525
"How to" => [
2626
".. model independent parameters" => "tutorials/blocks_corr.md",
2727
".. model site-global corr" => "tutorials/corr_site_global.md",
28+
".. use GPU" => "tutorials/lux_gpu.md",
2829
],
2930
"Explanation" => [
3031
#"Theory" => "explanation/theory_hvi.md", TODO activate when paper is published

docs/src/tutorials/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
[deps]
22
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
3+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
34
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
45
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
56
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
67
DistributionFits = "45214091-1ed4-4409-9bcf-fdb48a05e921"
78
HybridVariationalInference = "a108c475-a4e2-4021-9a84-cfa7df242f64"
89
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
10+
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
911
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
1012
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
1113
PairPlots = "43a3c2be-4208-490b-832a-a21dcd55d7da"
@@ -14,3 +16,4 @@ SimpleChains = "de6bee2f-e2f4-4ec7-b6ed-219cc6f6e9e5"
1416
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
1517
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
1618
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
19+
cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd"

docs/src/tutorials/basic_cpu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ epochs of the optimization.
327327
``` julia
328328
(; probo) = solve(probo_sites, solver; rng,
329329
callback = callback_loss(100), # output during fitting
330-
epochs = 10,
330+
epochs = 20,
331331
#is_inferred = Val(true), # activate type-checks
332332
);
333333
```

docs/src/tutorials/basic_cpu.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ execute:
77
daemon: 3600
88
format:
99
commonmark:
10-
variant: -raw_html
10+
variant: -raw_html+tex_math_dollars
1111
wrap: preserve
1212
bibliography: twutz_txt.bib
1313
---
-833 Bytes
Loading
-2.52 KB
Loading
1.19 KB
Loading

docs/src/tutorials/corr_site_global.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ HVI requires the site-parameter blocks in the correlation matrix to be
1414
independent of the global-parameter block.
1515

1616
However, correlations between site and global parameters can be modeled
17-
by predicting different (transformed) site parameters,
18-
$\zeta_{Ms}$
19-
, given the sampled
20-
(transformed) global parameters,
21-
$\zeta_P$
17+
by predicting different (transformed) site parameters, $\zeta_{Ms}$
18+
, given the sampled (transformed) global parameters, $\zeta_P$.
2219

2320
$$
2421
p(\zeta_{Ms}, \zeta_P) = p(\zeta_{Ms} | \zeta_P) p(\zeta_P)$$
@@ -69,7 +66,7 @@ pbm_covars = (:K2,)
6966

7067
The ML model needs to be adapted to consume more inputs than the site covariates.
7168
Note the changed `n_input` specification compared to the
72-
[Basic workflow without GPU](@ref) tutorial.
69+
[Basic workflow without GPU](@ref) turorial.
7370

7471
``` julia
7572
n_out = length(prob.θM) # number of individuals to predict

0 commit comments

Comments
 (0)