Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1'
version: '1.11'

- uses: julia-actions/cache@v2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
- version: 'min'
os: ubuntu-latest
num_threads: 2
# 1.11
- version: '1.11'
os: ubuntu-latest
num_threads: 2
# Single-threaded
- version: '1'
os: ubuntu-latest
num_threads: 1
# Minimum supported version, single-threaded
- version: 'min'
os: ubuntu-latest
num_threads: 1
# Windows
- version: '1'
os: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Enzyme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: julia-actions/setup-julia@v2
with:
version: "1"
version: "1.11"

- uses: julia-actions/cache@v2

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/JuliaPre.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: JuliaPre

on:
push:
branches:
- main
pull_request:
# JuliaPre tests are currently disabled because there is no pre-release of v1.13.
on: workflow_dispatch
# push:
# branches:
# - main
# pull_request:

# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
Expand Down
4 changes: 2 additions & 2 deletions src/simple_varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ julia> vi[@varname(x[1:2])]

julia> # (×) If we don't provide the container...
_, vi = DynamicPPL.evaluate_and_sample!!(rng, m, SimpleVarInfo()); vi
ERROR: type NamedTuple has no field x
ERROR: FieldError: type NamedTuple has no field `x`, available fields: `m`
[...]

julia> # If one does not know the varnames, we can use a `OrderedDict` instead.
Expand Down Expand Up @@ -158,7 +158,7 @@ ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2]
[...]

julia> svi_nt[@varname(m.b)]
ERROR: type NamedTuple has no field b
ERROR: FieldError: type NamedTuple has no field `b`, available fields: `a`
[...]
```

Expand Down
6 changes: 3 additions & 3 deletions test/ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest
# Used as the ground truth that others are compared against.
ref_adtype = AutoForwardDiff()

test_adtypes = if IS_PRERELEASE
[AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)]
else
test_adtypes = if MOONCAKE_SUPPORTED
[
AutoReverseDiff(; compile=false),
AutoReverseDiff(; compile=true),
AutoMooncake(; config=nothing),
]
else
[AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)]
end

@testset "Unsupported backends" begin
Expand Down
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ using DynamicPPL: getargs_dottilde, getargs_tilde
const GROUP = get(ENV, "GROUP", "All")
const AQUA = get(ENV, "AQUA", "true") == "true"

# Detect if prerelease version, if so, we skip some tests
const IS_PRERELEASE = !isempty(VERSION.prerelease)
if !IS_PRERELEASE
# Skip Mooncake if it doesn't work
const MOONCAKE_SUPPORTED = VERSION < v"1.12.0"
if MOONCAKE_SUPPORTED
Pkg.add("Mooncake")
using Mooncake: Mooncake
end
Expand Down Expand Up @@ -84,7 +84,7 @@ include("test_util.jl")
end
@testset "ad" begin
include("ext/DynamicPPLForwardDiffExt.jl")
if !IS_PRERELEASE
if MOONCAKE_SUPPORTED
include("ext/DynamicPPLMooncakeExt.jl")
end
include("ad.jl")
Expand Down