Conversation
Benchmark Report
Computer InformationBenchmark Results |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## breaking #1327 +/- ##
============================================
+ Coverage 78.13% 79.06% +0.93%
============================================
Files 50 50
Lines 3590 3559 -31
============================================
+ Hits 2805 2814 +9
+ Misses 785 745 -40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
DynamicPPL.jl documentation for PR #1327 is available at: |
461b5c9 to
d2585a3
Compare
Since accumulators are threadsafe (or to be precise, DynamicPPL can make them threadsafe when the user calls `setthreadsafe`), any functionality in DynamicPPL that only uses accumulators is automatically threadsafe. This means that, for example, you can sample random variables in parallel: ```julia @model function threaded_assume() x = zeros(10) Threads.@threads for i in eachindex(x) x[i] ~ Normal() end end model = setthreadsafe(threaded_assume(), true) julia> rand(model) VarNamedTuple └─ x => PartialArray size=(10,) data::Vector{Float64} ├─ (1,) => 0.7076777209105218 ├─ (2,) => -1.0664996275655731 │ ⋮ (7 more set indices) └─ (10,) => 0.6552123596028697 ``` This functionality has always existed (since #1284). I didn't realise at the time that that meant that even LogDensityFunction is now fully threadsafe. This PR just adds tests to verify that.
Closes #987 Uncovered a bug in the test suite ....
final changes to close #1157 --------- Co-authored-by: hardik-xi11 <hardiklaha@gmail.com>
While investigating TuringLang/Turing.jl#2798, I found that the issue was with a `tilde_assume!!` call in the Gibbs code. In the process of fixing it I realised that: 1. The Turing code uses what's now called `DynamicPPL.prefix_and_strip_contexts`, which performs a similar thing to the present `extract_prefixes`, but is a bit less general; 2. `prefix_and_strip_contexts` needed an API change; 3. `prefix_and_strip_contexts` was not public (so Turing was misusing it! -- probably my fault...) This PR therefore fixes all of these issues by creating a more general version and exporting it.
Probably a good idea to check ...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2>⚠️ This version introduces support for node24 which make cause breaking changes for systems that do not currently support node24.⚠️ </h2> <h2>What's Changed</h2> <ul> <li>Revert "Revert "build(deps): bump actions/github-script from 7.0.1 to 8.0.0"" by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1929">codecov/codecov-action#1929</a></li> <li>Th/6.0.0 by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1928">codecov/codecov-action#1928</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.4...v6.0.0">https://github.com/codecov/codecov-action/compare/v5.5.4...v6.0.0</a></p> <h2>v5.5.4</h2> <p>This is a mirror of <code>v5.5.2</code>. <code>v6</code> will be released which requires <code>node24</code></p> <h2>What's Changed</h2> <ul> <li>Revert "build(deps): bump actions/github-script from 7.0.1 to 8.0.0" by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1926">codecov/codecov-action#1926</a></li> <li>chore(release): 5.5.4 by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1927">codecov/codecov-action#1927</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.3...v5.5.4">https://github.com/codecov/codecov-action/compare/v5.5.3...v5.5.4</a></p> <h2>v5.5.3</h2> <h2>What's Changed</h2> <ul> <li>build(deps): bump actions/github-script from 7.0.1 to 8.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/codecov/codecov-action/pull/1874">codecov/codecov-action#1874</a></li> <li>chore(release): bump to 5.5.3 by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1922">codecov/codecov-action#1922</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.2...v5.5.3">https://github.com/codecov/codecov-action/compare/v5.5.2...v5.5.3</a></p> <h2>v5.5.2</h2> <h2>What's Changed</h2> <ul> <li>check gpg only when skip-validation = false by <a href="https://github.com/maxweng-sentry"><code>@maxweng-sentry</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1894">codecov/codecov-action#1894</a></li> <li>chore: <code>disable_search</code> alignment by <a href="https://github.com/freemanzMrojo"><code>@freemanzMrojo</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1881">codecov/codecov-action#1881</a></li> <li>chore(release): 5.5.2 by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1902">codecov/codecov-action#1902</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/maxweng-sentry"><code>@maxweng-sentry</code></a> made their first contribution in <a href="https://redirect.github.com/codecov/codecov-action/pull/1894">codecov/codecov-action#1894</a></li> <li><a href="https://github.com/freemanzMrojo"><code>@freemanzMrojo</code></a> made their first contribution in <a href="https://redirect.github.com/codecov/codecov-action/pull/1881">codecov/codecov-action#1881</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.1...v5.5.2">https://github.com/codecov/codecov-action/compare/v5.5.1...v5.5.2</a></p> <h2>v5.5.1</h2> <h2>What's Changed</h2> <ul> <li>build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/codecov/codecov-action/pull/1833">codecov/codecov-action#1833</a></li> <li>build(deps): bump github/codeql-action from 3.28.18 to 3.29.9 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/codecov/codecov-action/pull/1861">codecov/codecov-action#1861</a></li> <li>Document a <code>codecov-cli</code> version reference example by <a href="https://github.com/webknjaz"><code>@webknjaz</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1774">codecov/codecov-action#1774</a></li> <li>docs: fix typo in README by <a href="https://github.com/datalater"><code>@datalater</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1866">codecov/codecov-action#1866</a></li> <li>fix: update to use local app/ dir by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1872">codecov/codecov-action#1872</a></li> <li>build(deps): bump github/codeql-action from 3.29.9 to 3.29.11 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/codecov/codecov-action/pull/1867">codecov/codecov-action#1867</a></li> <li>build(deps): bump actions/checkout from 4.2.2 to 5.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/codecov/codecov-action/pull/1868">codecov/codecov-action#1868</a></li> <li>fix: overwrite pr number on fork by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1871">codecov/codecov-action#1871</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md">codecov/codecov-action's changelog</a>.</em></p> <blockquote> <h2>v5.5.2</h2> <h3>What's Changed</h3> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.1..v5.5.2">https://github.com/codecov/codecov-action/compare/v5.5.1..v5.5.2</a></p> <h2>v5.5.1</h2> <h3>What's Changed</h3> <ul> <li>fix: overwrite pr number on fork by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1871">codecov/codecov-action#1871</a></li> <li>build(deps): bump actions/checkout from 4.2.2 to 5.0.0 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1868">codecov/codecov-action#1868</a></li> <li>build(deps): bump github/codeql-action from 3.29.9 to 3.29.11 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1867">codecov/codecov-action#1867</a></li> <li>fix: update to use local app/ dir by <a href="https://github.com/thomasrockhu-codecov"><code>@thomasrockhu-codecov</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1872">codecov/codecov-action#1872</a></li> <li>docs: fix typo in README by <a href="https://github.com/datalater"><code>@datalater</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1866">codecov/codecov-action#1866</a></li> <li>Document a <code>codecov-cli</code> version reference example by <a href="https://github.com/webknjaz"><code>@webknjaz</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1774">codecov/codecov-action#1774</a></li> <li>build(deps): bump github/codeql-action from 3.28.18 to 3.29.9 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1861">codecov/codecov-action#1861</a></li> <li>build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1833">codecov/codecov-action#1833</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.5.0..v5.5.1">https://github.com/codecov/codecov-action/compare/v5.5.0..v5.5.1</a></p> <h2>v5.5.0</h2> <h3>What's Changed</h3> <ul> <li>feat: upgrade wrapper to 0.2.4 by <a href="https://github.com/jviall"><code>@jviall</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1864">codecov/codecov-action#1864</a></li> <li>Pin actions/github-script by Git SHA by <a href="https://github.com/martincostello"><code>@martincostello</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1859">codecov/codecov-action#1859</a></li> <li>fix: check reqs exist by <a href="https://github.com/joseph-sentry"><code>@joseph-sentry</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1835">codecov/codecov-action#1835</a></li> <li>fix: Typo in README by <a href="https://github.com/spalmurray"><code>@spalmurray</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1838">codecov/codecov-action#1838</a></li> <li>docs: Refine OIDC docs by <a href="https://github.com/spalmurray"><code>@spalmurray</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1837">codecov/codecov-action#1837</a></li> <li>build(deps): bump github/codeql-action from 3.28.17 to 3.28.18 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1829">codecov/codecov-action#1829</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.4.3..v5.5.0">https://github.com/codecov/codecov-action/compare/v5.4.3..v5.5.0</a></p> <h2>v5.4.3</h2> <h3>What's Changed</h3> <ul> <li>build(deps): bump github/codeql-action from 3.28.13 to 3.28.17 by <code>@app/dependabot</code> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1822">codecov/codecov-action#1822</a></li> <li>fix: OIDC on forks by <a href="https://github.com/joseph-sentry"><code>@joseph-sentry</code></a> in <a href="https://redirect.github.com/codecov/codecov-action/pull/1823">codecov/codecov-action#1823</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/codecov/codecov-action/compare/v5.4.2..v5.4.3">https://github.com/codecov/codecov-action/compare/v5.4.2..v5.4.3</a></p> <h2>v5.4.2</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/codecov/codecov-action/commit/57e3a136b779b570ffcdbf80b3bdc90e7fab3de2"><code>57e3a13</code></a> Th/6.0.0 (<a href="https://redirect.github.com/codecov/codecov-action/issues/1928">#1928</a>)</li> <li><a href="https://github.com/codecov/codecov-action/commit/f67d33dda8a42b51c42a8318a1f66468119e898b"><code>f67d33d</code></a> Revert "Revert "build(deps): bump actions/github-script from 7.0.1 to 8.0.0""...</li> <li>See full diff in <a href="https://github.com/codecov/codecov-action/compare/v5...v6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Penelope Yong <penelopeysm@gmail.com>
[//]: # (dependabot-start)⚠️ **Dependabot is rebasing this PR**⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 2 to 3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/julia-actions/cache/releases">julia-actions/cache's releases</a>.</em></p> <blockquote> <h2>v3.0.0 - Cache on failure (with override)</h2> <h2>What's Changed</h2> <h3>Breaking Changes</h3> <ul> <li>Caching will now happen when the job fails, with an override to restore the previous behavior via <code>save-always: false</code></li> </ul> <h3>Changes</h3> <ul> <li>Javascript version of existing action which also saves if job fails by <a href="https://github.com/jkrumbiegel"><code>@jkrumbiegel</code></a> <a href="https://github.com/penelopeysm"><code>@penelopeysm</code></a> <a href="https://github.com/IanButterworth"><code>@IanButterworth</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/198">julia-actions/cache#198</a> <a href="https://redirect.github.com/julia-actions/cache/pull/190">julia-actions/cache#190</a></li> <li>Fix retry on failure/cancelled example by <a href="https://github.com/IanButterworth"><code>@IanButterworth</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/174">julia-actions/cache#174</a></li> </ul> <h3>Maintenance</h3> <ul> <li>Bump pyTooling/Actions from 4.2.2 to 4.3.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/176">julia-actions/cache#176</a></li> <li>Bump dcarbone/install-jq-action from 3.1.1 to 3.2.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/178">julia-actions/cache#178</a></li> <li>Bump actions/cache from 4.2.3 to 4.2.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/180">julia-actions/cache#180</a></li> <li>Bump actions/checkout from 4.2.2 to 5.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/182">julia-actions/cache#182</a></li> <li>Bump pyTooling/Actions from 4.3.0 to 5.4.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/181">julia-actions/cache#181</a></li> <li>Bump actions/cache from 4.2.4 to 4.3.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/184">julia-actions/cache#184</a></li> <li>Bump pyTooling/Actions from 5.4.0 to 6.2.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/183">julia-actions/cache#183</a></li> <li>Remove trailing whitespaces from <code>README.md</code> by <a href="https://github.com/giordano"><code>@giordano</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/186">julia-actions/cache#186</a></li> <li>Bump pyTooling/Actions from 6.2.0 to 6.6.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/185">julia-actions/cache#185</a></li> <li>Bump actions/checkout from 5.0.0 to 6.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/189">julia-actions/cache#189</a></li> <li>Bump pyTooling/Actions from 6.6.0 to 6.7.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/188">julia-actions/cache#188</a></li> <li>Update GitHub Actions checkout action version by <a href="https://github.com/ViralBShah"><code>@ViralBShah</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/187">julia-actions/cache#187</a></li> <li>Bump actions/checkout from 6.0.0 to 6.0.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/191">julia-actions/cache#191</a></li> <li>Bump actions/cache from 4.3.0 to 5.0.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/192">julia-actions/cache#192</a></li> <li>Bump pyTooling/Actions from 6.7.0 to 7.2.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/193">julia-actions/cache#193</a></li> <li>Bump actions/checkout from 6.0.1 to 6.0.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/194">julia-actions/cache#194</a></li> <li>Bump actions/cache from 5.0.1 to 5.0.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/195">julia-actions/cache#195</a></li> <li>Bump pyTooling/Actions from 7.2.0 to 7.4.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/196">julia-actions/cache#196</a></li> <li>Bump pyTooling/Actions from 7.4.2 to 7.5.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/julia-actions/cache/pull/197">julia-actions/cache#197</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/ViralBShah"><code>@ViralBShah</code></a> made their first contribution in <a href="https://redirect.github.com/julia-actions/cache/pull/187">julia-actions/cache#187</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/julia-actions/cache/compare/v2.1.0...v3.0.0">https://github.com/julia-actions/cache/compare/v2.1.0...v3.0.0</a></p> <h2>v2.1.0 - New outputs <code>cache-paths</code> and <code>cache-key</code></h2> <h2>What's Changed</h2> <h3>New features</h3> <ul> <li>Output <code>cache-paths</code> and <code>cache-key</code> as well by <a href="https://github.com/penelopeysm"><code>@penelopeysm</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/169">julia-actions/cache#169</a></li> </ul> <h3>Maintenance</h3> <ul> <li>Bump actions/cache from 4.2.0 to 4.2.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/165">julia-actions/cache#165</a></li> <li>Link to Github caching docs from README.md by <a href="https://github.com/johnomotani"><code>@johnomotani</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/167">julia-actions/cache#167</a></li> <li>Bump actions/cache from 4.2.2 to 4.2.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/172">julia-actions/cache#172</a></li> <li>Bump dcarbone/install-jq-action from 3.0.1 to 3.1.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/171">julia-actions/cache#171</a></li> <li>Bump pyTooling/Actions from 3.1.1 to 4.2.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/julia-actions/cache/pull/170">julia-actions/cache#170</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/julia-actions/cache/commit/9a93c5fb3e9c1c20b60fc80a478cae53e38618a4"><code>9a93c5f</code></a> chore: bump @actions/* deps to latest and convert source to ESM (<a href="https://redirect.github.com/julia-actions/cache/issues/218">#218</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/c3e92b0efca5e74c06e7cc930f65825c926b6c9b"><code>c3e92b0</code></a> Bump actions/setup-node from 6.1.0 to 6.3.0 (<a href="https://redirect.github.com/julia-actions/cache/issues/211">#211</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/2d4cffa36efdd38eed4c8ef44bac3a2f0e2b7429"><code>2d4cffa</code></a> Bump brace-expansion from 1.1.12 to 1.1.13 (<a href="https://redirect.github.com/julia-actions/cache/issues/217">#217</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/e882f3e03ad4e47ee58eab75a040a6946b945a57"><code>e882f3e</code></a> Bump actions/checkout from 6.0.1 to 6.0.2 (<a href="https://redirect.github.com/julia-actions/cache/issues/212">#212</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/7eb2283d8cc0fd13d625c29d2069ddf4a8051d5b"><code>7eb2283</code></a> chore: add npm ecosystem to dependabot (<a href="https://redirect.github.com/julia-actions/cache/issues/213">#213</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/851ab0256a7c6a50d218086976d28a73a531fa40"><code>851ab02</code></a> Fix pidfile exclusion: split brace expansion into separate globs (<a href="https://redirect.github.com/julia-actions/cache/issues/210">#210</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/e97f6fc1a6e21c82253c85e269be7340376aa425"><code>e97f6fc</code></a> Delete pidfiles. Skip Pkg.gc when not saving. Don't delete old caches if no n...</li> <li><a href="https://github.com/julia-actions/cache/commit/09b9b25cd2299bc07850a3bc713245264c4b701e"><code>09b9b25</code></a> Bump fast-xml-parser from 5.5.6 to 5.5.7 (<a href="https://redirect.github.com/julia-actions/cache/issues/208">#208</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/b56ac815fc0bb3999501ca86291fa3d875c622ee"><code>b56ac81</code></a> Add instructions for LLM coding agents (AGENTS.md and CLAUDE.md) (<a href="https://redirect.github.com/julia-actions/cache/issues/206">#206</a>)</li> <li><a href="https://github.com/julia-actions/cache/commit/98ad0c96108a5cbce68768b00fc3a228892105bf"><code>98ad0c9</code></a> Bump fast-xml-parser from 5.4.2 to 5.5.6 (<a href="https://redirect.github.com/julia-actions/cache/issues/205">#205</a>)</li> <li>Additional commits viewable in <a href="https://github.com/julia-actions/cache/compare/v2...v3">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
@sunxd3 would you be able to take a look? Here's the TLDR and my overall thoughts on this:
|
sunxd3
left a comment
There was a problem hiding this comment.
I think the type hierarchy changes all makes sense. Although it is very breaking, even though I don't imagine a lot of people depend on the transformation interface, it might still worth giving some deprecation buffer (we can talk about this in the meeting).
The general interface also make sense to me.
Multivariate 10k has some performance regression on Mooncake, I wonder why.
|
The biggest break from this might be the removal of |
It's just CI flakiness, unfortunately I've found the numbers to vary by up to 50% even on a good day. I benchmarked locally to be sure, and there's no difference Benchmarking code & resultscodeusing DynamicPPL, Distributions, ADTypes, Mooncake, LogDensityProblems, Chairmarks
@model function multivariate(num_dims, ::Type{TV}=Vector{Float64}) where {TV}
a = TV(undef, num_dims)
o = TV(undef, num_dims)
a ~ product_distribution(fill(Normal(0, 1), num_dims))
m = sum(a)
o ~ product_distribution(fill(Normal(m, 1), num_dims))
return (; a=a)
end
x = randn(10000);
model = multivariate(10000) | (; o = x);
ldf = LogDensityFunction(model, getlogjoint_internal, LinkAll(); adtype=AutoMooncake());
p = rand(ldf);
@be LogDensityProblems.logdensity($ldf, $p)
@be LogDensityProblems.logdensity_and_gradient($ldf, $p)mainjulia> @be LogDensityProblems.logdensity($ldf, $p)
Benchmark: 371 samples with 1 evaluation
min 104.875 μs (28 allocs: 1.063 MiB)
median 148.292 μs (28 allocs: 1.063 MiB)
mean 256.189 μs (28 allocs: 1.063 MiB, 4.57% gc time)
max 18.380 ms (28 allocs: 1.063 MiB, 98.90% gc time)
julia> @be LogDensityProblems.logdensity_and_gradient($ldf, $p)
Benchmark: 52 samples with 1 evaluation
min 1.454 ms (59 allocs: 2.220 MiB)
median 1.570 ms (59 allocs: 2.220 MiB)
mean 1.947 ms (59 allocs: 2.220 MiB, 4.33% gc time)
max 13.387 ms (59 allocs: 2.220 MiB, 87.35% gc time)This PRjulia> @be LogDensityProblems.logdensity($ldf, $p)
Benchmark: 432 samples with 1 evaluation
min 106.250 μs (28 allocs: 1.063 MiB)
median 142.667 μs (28 allocs: 1.063 MiB)
mean 183.366 μs (28 allocs: 1.063 MiB, 4.52% gc time)
max 1.048 ms (28 allocs: 1.063 MiB, 86.68% gc time)
julia> @be LogDensityProblems.logdensity_and_gradient($ldf, $p)
Benchmark: 50 samples with 1 evaluation
min 1.483 ms (59 allocs: 2.220 MiB)
median 1.571 ms (59 allocs: 2.220 MiB)
mean 2.020 ms (59 allocs: 2.220 MiB, 5.51% gc time)
max 14.799 ms (59 allocs: 2.220 MiB, 88.62% gc time) |
The change is intentional on my part though:
|
|
I saw the changelog and think the are clear. I agree with your judgement on this — it is probably impossible to make correct at the moment and removing makes sense. I was just mentioning because it's a pattern that was used a lot internally and externally. Maybe we could leave a deprecate or error message? |
|
I added this: julia> vi[@varname(x)]
ERROR: ArgumentError: The method `varinfo[varname(s)]` has been removed in DynamicPPL v0.41: please see https://turinglang.org/DynamicPPL.jl/stable/migration/#Getting-parameter-values for information on how to update your code if needed. |
|
I think the remaining question is whether to change the type hierarchy. As I see it, the main benefit of switching it over is that basically that we don't duplicate type info for the transform + transformed value (previously they would be separate things, now the latter wraps the former). I was a bit concerned about breakage, but I did a GitHub search and I think it only breaks Turing so maybe it's not too bad? |
|
My judgement is that the type hierarchy breaking is not a big deal — it was pretty new and somewhat of an "advanced" feature |
|
@sunxd3 Thanks! Are you happy with the PR, or are there more things you think need to be discussed? |
Closes #1249. I'll write more here later, but you can see the changelog for a good overview of this PR.
Things to do
Possibly in a separate PR:
bijector(model), and whether that can be removed (though, note also VI interface is too low-level Turing.jl#2783)bijector(model). It runs perfectly fine with dynamic transforms and can be made to work with fixed transforms as well, which would potentially provide perf benefits but otherwise not much difference is required in the APISome scripts to use to benchmark: