TuringLang / AbstractPPL.jl

Common types and interfaces for probabilistic programming
http://turinglang.org/AbstractPPL.jl/
MIT License
27 stars 7 forks source link

Fix `get` function #93

Closed sunxd3 closed 7 months ago

sunxd3 commented 7 months ago

Current:

using AbstractPPL

# current `master`
get((;y = 1,), @varname(y)) # == (y = 1,)

# this PR
get((;y = 1,), @varname(y)) # == 1

Somehow the PropertyLens{sym}() was dropped during the transition to Accessors.jl, sorry for the overlook.

sunxd3 commented 7 months ago

@yebai thanks for taking a look.

Regarding the errors in DynamicPPL, I am not sure what's causing the errors -- will take try to solve them tomorrow.

The error that triggered this PR is resolved, I believe.