Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get function #93

Merged
merged 7 commits into from
Apr 7, 2024
Merged

Fix get function #93

merged 7 commits into from
Apr 7, 2024

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Apr 7, 2024

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.

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

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

Thanks @sunxd3 -- looks good. It seems some CI tests still fail from the DynamicPPL side. Are these failure still caused by AbstractPPL?


julia> get(nt, @varname(\$name.b.c[1]))
1
Alias for `(PropertyLens{sym}() ⨟ getoptic(vn))(obj)`.
Copy link
Member

Choose a reason for hiding this comment

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

This is potentially hard to read.

@sunxd3
Copy link
Member Author

sunxd3 commented Apr 7, 2024

@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.

@yebai yebai merged commit 9d35b63 into main Apr 7, 2024
10 checks passed
@yebai yebai deleted the sunxd/fix-get-function branch April 7, 2024 17:30
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