Skip to content

Conversation

penelopeysm
Copy link
Member

Not being used anywhere, AFAICT.

"that the element type of `LHS` is not a supertype of the support type of " *
"`AbstractVector` to eliminate ambiguity."

alg_str(spl::Sampler) = string(nameof(typeof(spl.alg)))
Copy link
Member Author

@penelopeysm penelopeysm Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alg_str is in fact used in the Turing test suite, but they just test that it exists, it's not actually used in any Turing library code. So I'm pretty confused. I don't see much of a point, though, because Sampler is on its way out (once TuringLang/Turing.jl#2555 is done we should be able to remove it).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think possibly this is a holdover from the time that Sampler was more heavily used -- a lot of this was gotten rid of a couple versions ago)

Comment on lines -1 to -2
using Distributions:
UnivariateDistribution, MultivariateDistribution, MatrixDistribution, Distribution
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a blanket using Distributions in src/DynamicPPL.jl so this shouldn't be needed

Copy link
Contributor

github-actions bot commented Jun 17, 2025

Benchmark Report for Commit 4c14d7b

Computer Information

Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 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)

Benchmark Results

|                 Model | Dimension |  AD Backend |      VarInfo Type | Linked | Eval Time / Ref Time | AD Time / Eval Time |
|-----------------------|-----------|-------------|-------------------|--------|----------------------|---------------------|
| Simple assume observe |         1 | forwarddiff |             typed |  false |                  9.3 |                 1.5 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                731.6 |                35.9 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                300.9 |                65.7 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1223.9 |                27.4 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               3206.7 |                24.1 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1422.0 |                29.5 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |                932.3 |                 5.2 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               5338.3 |                 4.1 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |                983.5 |                 8.9 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              60520.1 |                 3.7 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               8877.0 |                 9.5 |
|               Dynamic |        10 |    mooncake |             typed |   true |                125.9 |                14.2 |
|              Submodel |         1 |    mooncake |             typed |   true |                 12.9 |                 6.6 |
|                   LDA |        12 | reversediff |             typed |   true |                436.9 |                 7.9 |

Copy link
Contributor

DynamicPPL.jl documentation for PR #956 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR956/

Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.98%. Comparing base (3e54c2d) to head (4c14d7b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #956      +/-   ##
==========================================
+ Coverage   82.92%   82.98%   +0.06%     
==========================================
  Files          36       36              
  Lines        3964     3961       -3     
==========================================
  Hits         3287     3287              
+ Misses        677      674       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls
Copy link

coveralls commented Jun 17, 2025

Pull Request Test Coverage Report for Build 15755189020

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1935 unchanged lines in 26 files lost coverage.
  • Overall coverage decreased (-50.0%) to 33.07%

Files with Coverage Reduction New Missed Lines %
src/extract_priors.jl 5 53.57%
src/test_utils/model_interface.jl 5 22.22%
src/test_utils/varinfo.jl 5 76.19%
src/transforming.jl 5 72.22%
src/logdensityfunction.jl 10 76.6%
src/model_utils.jl 11 0.0%
src/distribution_wrappers.jl 16 0.0%
src/values_as_in_model.jl 23 0.0%
src/submodel_macro.jl 26 0.0%
src/context_implementations.jl 28 66.67%
Totals Coverage Status
Change from base Build 15438668340: -50.0%
Covered Lines: 1299
Relevant Lines: 3928

💛 - Coveralls

@penelopeysm penelopeysm requested a review from AoifeHughes June 17, 2025 08:56
@penelopeysm
Copy link
Member Author

I'll just make a patch bump just to make sure Turing doesn't get caught out by alg_str thing

@penelopeysm penelopeysm merged commit 968c879 into main Jun 19, 2025
8 of 19 checks passed
@penelopeysm penelopeysm deleted the py/no-dead-code branch June 19, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants