Skip to content

Commit 24eff6b

Browse files
committed
keep updating timing result
1 parent e21d3cc commit 24eff6b

File tree

29 files changed

+382
-99
lines changed

29 files changed

+382
-99
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
profiles {
2+
standard {
3+
docker.enabled = true
4+
process {
5+
withLabel:containerized {
6+
container = 'alexandrebouchardcote/default:0.1.6'
7+
}
8+
}
9+
}
10+
cluster {
11+
apptainer.enabled = true
12+
process {
13+
scratch = true
14+
executor = 'slurm'
15+
cpus = 1
16+
memory = 4.GB
17+
time = '2h'
18+
clusterOptions = "--nodes=1 --account $ALLOCATION_CODE"
19+
withLabel:containerized {
20+
container = 'alexandrebouchardcote/default:0.1.6'
21+
module = 'apptainer'
22+
}
23+
withLabel:gpu {
24+
clusterOptions = "--nodes=1 --account ${ALLOCATION_CODE}-gpu --gpus 1"
25+
}
26+
}
27+
}
28+
}
29+
30+
// Configs outside of profiles are applied to all profiles, but this only works correctly
31+
// if they do not occur in same scope as things in profile scopes,
32+
// search 'Danger' in https://www.nextflow.io/docs/latest/config.html
33+
34+
resume = true // comment out to disable resume
35+
36+
report {
37+
enabled = true
38+
file = "report.html"
39+
overwrite = true
40+
}
41+
42+
dag {
43+
enabled = true
44+
file = "dag.html"
45+
overwrite = true
46+
}
47+
48+
timeline {
49+
enabled = true
50+
file = "timeline.html"
51+
overwrite = true
52+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
profiles {
2+
standard {
3+
docker.enabled = true
4+
process {
5+
withLabel:containerized {
6+
container = 'alexandrebouchardcote/default:0.1.6'
7+
}
8+
}
9+
}
10+
cluster {
11+
apptainer.enabled = true
12+
process {
13+
scratch = true
14+
executor = 'slurm'
15+
cpus = 1
16+
memory = 4.GB
17+
time = '2h'
18+
clusterOptions = "--nodes=1 --account $ALLOCATION_CODE"
19+
withLabel:containerized {
20+
container = 'alexandrebouchardcote/default:0.1.6'
21+
module = 'apptainer'
22+
}
23+
withLabel:gpu {
24+
clusterOptions = "--nodes=1 --account ${ALLOCATION_CODE}-gpu --gpus 1"
25+
}
26+
}
27+
}
28+
}
29+
30+
// Configs outside of profiles are applied to all profiles, but this only works correctly
31+
// if they do not occur in same scope as things in profile scopes,
32+
// search 'Danger' in https://www.nextflow.io/docs/latest/config.html
33+
34+
resume = true // comment out to disable resume
35+
36+
report {
37+
enabled = true
38+
file = "report.html"
39+
overwrite = true
40+
}
41+
42+
dag {
43+
enabled = true
44+
file = "dag.html"
45+
overwrite = true
46+
}
47+
48+
timeline {
49+
enabled = true
50+
file = "timeline.html"
51+
overwrite = true
52+
}

example/julia_env/Manifest.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,9 +1559,17 @@ version = "1.2.0"
15591559

15601560
[[deps.NormalizingFlows]]
15611561
deps = ["ADTypes", "Bijectors", "DifferentiationInterface", "Distributions", "DocStringExtensions", "LinearAlgebra", "Optimisers", "ProgressMeter", "Random", "StatsBase"]
1562-
git-tree-sha1 = "17d89739ee13b1e62381d7ad5c6094d94cadf1bd"
1562+
git-tree-sha1 = "fd54eff641bb9c5fbd0cd1991bae15f1a64ef0bf"
1563+
repo-rev = "main"
1564+
repo-url = "https://github.com/TuringLang/NormalizingFlows.jl.git"
15631565
uuid = "50e4474d-9f12-44b7-af7a-91ab30ff6256"
1564-
version = "0.2.0"
1566+
version = "0.2.1"
1567+
1568+
[deps.NormalizingFlows.extensions]
1569+
NormalizingFlowsCUDAExt = "CUDA"
1570+
1571+
[deps.NormalizingFlows.weakdeps]
1572+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
15651573

15661574
[[deps.Observables]]
15671575
git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225"

example/julia_env/Model.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ real_data_list = Set(["Brownian", "Sonar", "SparseRegression", "TReg", "LGCP"])
6969
LogDensityProblems.dimension(dist::ContinuousDistribution) = length(dist)
7070
LogDensityProblems.logdensity(dist::ContinuousDistribution, x) = logpdf(dist, x)
7171

72-
73-
7472
# tracking logdensity prob
7573
mutable struct TrackedLogDensityProblem{Prob}
7674
n_density_evals :: Int

example/julia_env/mfvi.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function mfvi(
4343
end
4444

4545
# target = load_model("Banana")
46-
# flow, stats = mfvi(target; sample_per_iter = 10, max_iters = 10000)
46+
# flow, stats = mfvi(target; sample_per_iter = 10, max_iters = 1000)
4747

4848
# function visualize(p::Bijectors.MultivariateTransformed, samples=rand(p, 1000))
4949
# xrange = range(minimum(samples[1, :]) - 1, maximum(samples[1, :]) + 1; length=100)

example/julia_env/targets/brownian.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ end
66
function LogDensityProblems.capabilities(::Type{<:BrownianMotion})
77
return LogDensityProblems.LogDensityOrder{2}()
88
end
9-
function LogDensityProblems.logdensity(prob::BrownianMotion, θ)
9+
10+
function LogDensityProblems.logdensity(prob::BrownianMotion, θ::AbstractVector)
1011
(; y, obs_idx) = prob
1112
x = @view(θ[1:30])
1213
α_inn = StatsFuns.softplus(θ[31])

example/julia_env/targets/lgcp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct LogGaussianCoxProcess{
1212
logjac :: LogJac
1313
end
1414

15-
function LogDensityProblems.logdensity(prob::LogGaussianCoxProcess, f_white)
15+
function LogDensityProblems.logdensity(prob::LogGaussianCoxProcess, f_white::AbstractVector)
1616
(; area, counts, gp_mean, gp_cov_chol, logjac) = prob
1717
f = gp_cov_chol * f_white + gp_mean
1818
ℓp_f = logpdf(MvNormal(Zeros(length(f)), I), f_white)

example/julia_env/targets/logreg_sonar.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ struct LogisticRegression{XT, YT}
55
y::YT
66
end
77

8-
function LogDensityProblems.logdensity(prob::LogisticRegression, θ)
8+
function LogDensityProblems.logdensity(prob::LogisticRegression, θ::AbstractVector)
99
(; X, y) = prob
1010

1111
ℓp_θ = mapreduce(normlogpdf, +, θ)

example/julia_env/targets/sparse_reg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ end
3232

3333
LogDensityProblems.dimension(prob::SparseRegression) = prob.d
3434

35-
function LogDensityProblems.logdensity(prob::SparseRegression, z)
35+
function LogDensityProblems.logdensity(prob::SparseRegression, z::AbstractVector)
3636
(; fs, rs, N, d) = prob
3737

3838
# s := logσ²

example/julia_env/targets/t_reg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ end
3737
#######################
3838
# models ( t₅(Xβ, 1)-distirbution lin reg with heavy tailed prior, β ∼ Cauchy(0, 1))
3939
#######################
40-
function LogDensityProblems.logdensity(prob::StudentTRegression, β)
40+
function LogDensityProblems.logdensity(prob::StudentTRegression, β::AbstractVector)
4141
(; X, Y, N, d) = prob
4242

4343
ℓp_β = -d*log(π) - sum(log1p, β.^2.0)

0 commit comments

Comments
 (0)