Use the inner Product constructor in arraydist#1441
Draft
shravanngoswamii wants to merge 1 commit into
Draft
Conversation
shravanngoswamii
marked this pull request as draft
July 26, 2026 07:42
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1441 +/- ##
==========================================
+ Coverage 81.63% 81.70% +0.07%
==========================================
Files 50 50
Lines 3578 3581 +3
==========================================
+ Hits 2921 2926 +5
+ Misses 657 655 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
DynamicPPL.jl documentation for PR #1441 is available at: |
Contributor
Benchmarks @ 0adc101Performance Ratio: gradient time divided by log-density time. For very small models these ratios are noisy across runs and machines; raw primal and gradient timings are more reliable. The benchmarks are aimed at DynamicPPL developers and mainly catch obvious allocation or type-stability regressions. See benchmark notes for details. Main @ 8415f12EnvironmentJulia Version 1.11.9 Commit 53a02c0720c (2026-02-06 00:27 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 4 × AMD EPYC 7763 64-Core Processor WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
arraydiston a vector of univariate distributions returnsProduct(dists). That outer constructor is deprecated, so it callsBase.depwarn, which walks a backtrace on every call. Models with anarraydistlikelihood pay it once per evaluation, and tests run with--depwarn=yesby default.#1305 was meant to be a no-op when it moved these definitions in, but the DistributionsAD version used the inner constructor exactly to avoid this (dc92604, "Avoid changing return type"). This puts that back, so the return type is unchanged and the warning goes away. Keeping this method separate from the generic one still makes sense:
product_distributiongivesDiagNormalfor a vector ofNormals, andProductis faster there, 345 ns and 2 allocations against 582 ns and 8, at n = 100.It does keep a deprecated type alive though.
Productis due to be removed from Distributions, and DistributionsAD is archived now, so there is no upstream to follow. If you would rather droparraydistaltogether (DistributionsAD#274) or take theDiagNormalchange instead, I can close this.Switching the likelihoods away from
arraydistin TuringGLM took its lts CI job from 88 minutes to 8, see TuringLang/TuringGLM.jl#195.