Skip to content

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Feb 20, 2025

some more fixes to get more tests to pass, i commented on a couple of bits & the rest should be fairly self explanatory

@penelopeysm penelopeysm changed the base branch from master to py/no-ldp-ad February 20, 2025 21:22
Comment on lines -441 to +443
logdensity = DynamicPPL.setmodel(state.ldf, model, sampler.alg.adtype)
logdensity = DynamicPPL.LogDensityFunction(
model, state.ldf.varinfo, state.ldf.context; adtype=sampler.alg.adtype
)
Copy link
Member Author

Choose a reason for hiding this comment

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

setmodel technically still exists, but it doesn't take the adtype argument anymore, and i think it's clearer to reconstruct the LDF (which is what setmodel does anyway)

Comment on lines 561 to +563
@model function vdemo7()
x = Array{Real}(undef, N, N)
return x .~ [InverseGamma(2, 3) for i in 1:N]
return x ~ filldist(InverseGamma(2, 3), N, N)
Copy link
Member Author

@penelopeysm penelopeysm Feb 20, 2025

Choose a reason for hiding this comment

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

I'm kind of unsure as to whether we really need to keep the vdemoN models around. As far as I can tell, they're just legacy tests that try out different 'forms' of vectorisation and presumably the timings that are printed are meant to be some marker of their performance. But surely this is covered by DynamicPPL demo models already? I personally wouldn't mind if we just deleted the entire block

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 45.38%. Comparing base (ee2b148) to head (ea00f86).
Report is 1 commits behind head on mhauru/dppl-0.35.

Files with missing lines Patch % Lines
src/mcmc/sghmc.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           mhauru/dppl-0.35    #2491       +/-   ##
=====================================================
+ Coverage             29.77%   45.38%   +15.60%     
=====================================================
  Files                    21       21               
  Lines                  1387     1397       +10     
=====================================================
+ Hits                    413      634      +221     
+ Misses                  974      763      -211     

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

@penelopeysm penelopeysm marked this pull request as ready for review February 25, 2025 14:15
Base automatically changed from py/no-ldp-ad to mhauru/dppl-0.35 February 25, 2025 14:39
@penelopeysm penelopeysm merged commit d473012 into mhauru/dppl-0.35 Feb 25, 2025
1 check failed
@penelopeysm penelopeysm deleted the py/more-dppl-fixes branch February 25, 2025 15:07
mhauru added a commit that referenced this pull request Mar 13, 2025
* Progress towards compat with DPPL v0.35

* More fixing of DPPL v0.35 stuff

* Fix LogDensityFunction argument order

* More minor bugfixes

* [TEMP] Commit Manifest pointing to DynamicPPL#release-0.35

* remove LogDensityProblemsAD (#2490)

* Remove LogDensityProblemsAD, part 1

* update Optimisation code to not use LogDensityProblemsAD

* Fix field name change

* Don't put chunksize=0

* Remove LogDensityProblemsAD dep

* Improve OptimLogDensity docstring

* Remove unneeded model argument to _optimize

* Fix more tests

* Remove essential/ad from the list of CI groups

* Fix HMC function

* more test fixes (#2491)

* Remove LogDensityProblemsAD, part 1

* update Optimisation code to not use LogDensityProblemsAD

* Fix field name change

* Don't put chunksize=0

* Remove LogDensityProblemsAD dep

* Improve OptimLogDensity docstring

* Remove unneeded model argument to _optimize

* Fix more tests

* Remove essential/ad from the list of CI groups

* Fix HMC function

* More test fixes

* Remove Manifest

* More fixes for DynamicPPL 0.35 (#2494)

* Remove test/dynamicppl/compiler.jl

* Remove old regression tests

* Remove vdemo2

* Fix last test

* Add HISTORY.md entry about DPPL 0.35

* Allow ESS to sample variables with different symbols

* Update a TODO note

---------

Co-authored-by: Penelope Yong <[email protected]>
mhauru added a commit that referenced this pull request Mar 19, 2025
* Bump minor version to v0.37

* Remove selector/space stuff (#2458)

* Remove selector stuff from ESS

* Remove selector stuff from MH

* Remove selector stuff from HMC

* Remove selector stuff from Emcee

* Remove selector stuff from IS

* Add missing getspace methods

* Remove selector stuff for particle methods

* Fix an HMC selector bug

* Code style

* Fix Emcee selector bug

* Fix typo in ESS tests

* Fix some constructor overwrites

* Remove unnecessary tests

* Remove selector stuff from SGHMC

* Remove drop_space and other non-longer-necessary deprecation measures

* Bump minor version 0.37. Add a HISTORY.md entry

* Apply suggestions from code review

Co-authored-by: Penelope Yong <[email protected]>

* Remove unnecessary type parameters

Co-authored-by: Penelope Yong <[email protected]>

* Simplify constructors in particle_mcmc.jl

* Remove calls to setgid and updategid

---------

Co-authored-by: Penelope Yong <[email protected]>

* Bump Mooncake compat to 0.4.95

* Support for DynamicPPL v0.35 (#2488)

* Progress towards compat with DPPL v0.35

* More fixing of DPPL v0.35 stuff

* Fix LogDensityFunction argument order

* More minor bugfixes

* [TEMP] Commit Manifest pointing to DynamicPPL#release-0.35

* remove LogDensityProblemsAD (#2490)

* Remove LogDensityProblemsAD, part 1

* update Optimisation code to not use LogDensityProblemsAD

* Fix field name change

* Don't put chunksize=0

* Remove LogDensityProblemsAD dep

* Improve OptimLogDensity docstring

* Remove unneeded model argument to _optimize

* Fix more tests

* Remove essential/ad from the list of CI groups

* Fix HMC function

* more test fixes (#2491)

* Remove LogDensityProblemsAD, part 1

* update Optimisation code to not use LogDensityProblemsAD

* Fix field name change

* Don't put chunksize=0

* Remove LogDensityProblemsAD dep

* Improve OptimLogDensity docstring

* Remove unneeded model argument to _optimize

* Fix more tests

* Remove essential/ad from the list of CI groups

* Fix HMC function

* More test fixes

* Remove Manifest

* More fixes for DynamicPPL 0.35 (#2494)

* Remove test/dynamicppl/compiler.jl

* Remove old regression tests

* Remove vdemo2

* Fix last test

* Add HISTORY.md entry about DPPL 0.35

* Allow ESS to sample variables with different symbols

* Update a TODO note

---------

Co-authored-by: Penelope Yong <[email protected]>

* Fix call to DynamicPPL.initialize_parameters!!

* Remove `Zygote` (#2505)

* Remove `Zygote`; fix #2504

* Update test/test_utils/ad_utils.jl

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Add HISTORY.md entry about removing support for Zygote

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Markus Hauru <[email protected]>
Co-authored-by: Penelope Yong <[email protected]>
Co-authored-by: Markus Hauru <[email protected]>

* Fix a Gibbs test

* Clean up exports (#2474)

* Regroup exports by package

* Export DynamicPPL.returned and DynamicPPL.prefix

* Stop exporting  @logprob_str and @prob_str

* Remove DynamicPPL module export

* Remove DynamicPPL.LogDensityFunction re-export

* Remove BernoulliLogit, drop support for Distributions < 0.25.77

* Stop blanket re-exporting Libtask and Bijectors

* Manually specify AbstractMCMC exports

* Format

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Remove Bijectors.ordered export

* Re-export LinearAlgebra.I

* Replace Turing.Model -> DynamicPPL.Model

* Format

* Keep exporting LogDensityFunction

* Add note in docs

* Align Turing exports with docs API page

* Fix things like `predict` on docs API page

* Fix a Gibbs test

* Format

* Fix missing Bijectors import

* Update docs/src/api.md

Co-authored-by: Markus Hauru <[email protected]>

* Update docs/src/api.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Clean up broken docs links, remove unneeded deps

* Format

* Add changelog entry for exports

* Clean up exports in essential/Essential

* Apply suggestions from code review

Co-authored-by: Markus Hauru <[email protected]>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Markus Hauru <[email protected]>
Co-authored-by: Markus Hauru <[email protected]>

---------

Co-authored-by: Penelope Yong <[email protected]>
Co-authored-by: Hong Ge <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants