-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added method for extracting the child lens from a varname subsumed by another varname * added nested_getindex and nested_setindex! for VarInfo * added ConstructionBase.setproperties implementation for `Cholesky` * fixed minor formatting issue * added `supports_varname_indexing` for chains and use this in generated_quantities * use a private method rather than overloading getindex for Chains * removed getindex overloads in nested_index testing * moved generated_quantities tests to test/model.jl * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * will now also correctly set variables to be resampled, etc. * Update test/model.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/varinfo.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * added Compat as a test dep so we can methods such as stack * improved overload of ConstructionBase.setproperties * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * added docstring to remove_parent_lens * removed methods which are not useful for the purpose of this PR * noticed we're incorrectly using chain rather than chain_params in generated_quantities * Update ext/DynamicPPLMCMCChainsExt.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fixed doctests * added Requires.jl * Update src/DynamicPPL.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * bump patch version * Update src/DynamicPPL.jl Co-authored-by: David Widmann <[email protected]> * moved new generated_quantities functionality into setval_and_resample! so we can make use of this also for Turing.predict, etc. * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update ext/DynamicPPLMCMCChainsExt.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/chains.jl Co-authored-by: Xianda Sun <[email protected]> * bump compat entry for ConstructionBase.jl --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: David Widmann <[email protected]> Co-authored-by: Xianda Sun <[email protected]>
- Loading branch information
1 parent
52cd7f9
commit ffe9272
Showing
9 changed files
with
238 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
supports_varname_indexing(chain::AbstractChains) | ||
Return `true` if `chain` supports indexing using `VarName` in place of the | ||
variable name index. | ||
""" | ||
supports_varname_indexing(::AbstractChains) = false | ||
|
||
""" | ||
getindex_varname(chain::AbstractChains, sample_idx, varname::VarName, chain_idx) | ||
Return the value of `varname` in `chain` at `sample_idx` and `chain_idx`. | ||
Whether this method is implemented for `chains` is indicated by [`supports_varname_indexing`](@ref). | ||
""" | ||
function getindex_varname end | ||
|
||
""" | ||
varnames(chains::AbstractChains) | ||
Return an iterator over the varnames present in `chains`. | ||
Whether this method is implemented for `chains` is indicated by [`supports_varname_indexing`](@ref). | ||
""" | ||
function varnames end |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
ffe9272
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
ffe9272
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/91113
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: