Skip to content

Commit 999bd3c

Browse files
authored
update to latest turing (#64)
* Broaden compat * datastructure too * fix stuff * more fixes * gha perms * update coverage action too
1 parent e1affc2 commit 999bd3c

File tree

8 files changed

+39
-28
lines changed

8 files changed

+39
-28
lines changed

.github/workflows/Docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
permissions:
1717
contents: write
18-
pull-requests: read
18+
pull-requests: write
1919

2020
jobs:
2121
docs:

.github/workflows/ci.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,39 @@ on:
44
branches:
55
- main
66
pull_request:
7+
8+
# needed to allow julia-actions/cache to delete old caches that it has created
9+
permissions:
10+
actions: write
11+
contents: read
12+
13+
# Cancel existing tests on the same PR if a new commit is added to a pull request
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
718
jobs:
819
test:
9-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1020
runs-on: ${{ matrix.os }}
1121
strategy:
1222
fail-fast: false
1323
matrix:
14-
version:
15-
- '1'
1624
os:
1725
- ubuntu-latest
1826
- macOS-latest
1927
- windows-latest
20-
arch:
21-
- x64
28+
2229
steps:
23-
- uses: actions/checkout@v2
24-
- uses: julia-actions/setup-julia@v1
30+
- uses: actions/checkout@v4
31+
- uses: julia-actions/setup-julia@v2
2532
with:
26-
version: ${{ matrix.version }}
27-
arch: ${{ matrix.arch }}
28-
- uses: actions/cache@v1
29-
env:
30-
cache-name: cache-artifacts
31-
with:
32-
path: ~/.julia/artifacts
33-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
34-
restore-keys: |
35-
${{ runner.os }}-test-${{ env.cache-name }}-
36-
${{ runner.os }}-test-
37-
${{ runner.os }}-
38-
- uses: julia-actions/julia-buildpkg@latest
39-
- uses: julia-actions/julia-runtest@latest
33+
version: "1"
34+
- uses: julia-actions/cache@v2
35+
- uses: julia-actions/julia-buildpkg@v1
36+
- uses: julia-actions/julia-runtest@v1
4037
- uses: julia-actions/julia-processcoverage@v1
41-
- uses: codecov/codecov-action@v1
38+
- uses: codecov/codecov-action@v5
4239
with:
43-
file: lcov.info
40+
files: lcov.info
41+
token: ${{ secrets.CODECOV_TOKEN }}
42+
fail_ci_if_error: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.jl.cov
33
*.jl.mem
44
/docs/build/
5+
Manifest.toml

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TuringCallbacks"
22
uuid = "ea0860ee-d0ef-45ef-82e6-cc37d6be2f9c"
33
authors = ["Tor Erlend Fjelde <tor.erlend95@gmail.com> and contributors"]
4-
version = "0.4.3"
4+
version = "0.4.4"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -21,13 +21,13 @@ Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
2121
TuringCallbacksTuringExt = "Turing"
2222

2323
[compat]
24-
DataStructures = "0.18"
24+
DataStructures = "0.18 - 0.19"
2525
DocStringExtensions = "0.8, 0.9"
2626
OnlineStats = "1.5"
2727
Reexport = "0.2, 1.0"
2828
Requires = "1"
2929
TensorBoardLogger = "0.1.22"
30-
Turing = "0.29, 0.30, 0.31, 0.32, 0.33"
30+
Turing = "0.39"
3131
julia = "1"
3232

3333
[extras]

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
TuringCallbacks = "ea0860ee-d0ef-45ef-82e6-cc37d6be2f9c"
4+
5+
[compat]
6+
Documenter = "1"

ext/TuringCallbacksTuringExt.jl

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

5656
function TuringCallbacks.hyperparam_metrics(
5757
model,
58-
sampler::Turing.Sampler{<:Turing.Inference.NUTS}
58+
sampler::DynamicPPL.Sampler{<:Turing.Inference.NUTS}
5959
)
6060
return [
6161
"extras/acceptance_rate/stat/Mean",

test/Project.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
[deps]
2+
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
23
TensorBoardLogger = "899adc3e-224a-11e9-021f-63837185c80f"
34
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
45
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
56
ValueHistories = "98cad3c8-aec3-5f06-8e41-884608649ab7"
7+
8+
[compat]
9+
TensorBoardLogger = "0.1.26"
10+
Test = "1.11.0"
11+
Turing = "0.39.10"
12+
ValueHistories = "0.5.4"

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Test
2+
using DynamicPPL
23
using Turing
34
using TuringCallbacks
45
using TensorBoardLogger, ValueHistories

0 commit comments

Comments
 (0)