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

Empty transform with (new) Soss.as #342

Closed
marius311 opened this issue Jun 15, 2022 · 4 comments · Fixed by #348
Closed

Empty transform with (new) Soss.as #342

marius311 opened this issue Jun 15, 2022 · 4 comments · Fixed by #348
Assignees

Comments

@marius311
Copy link

Looks like Soss.xform was recently replaced with Soss.as. I updated MuseInference accordingly, but now I see an error which I can track down to that the following produces an empty transform, whereas before it (correctly, I think?) contained a transform on z:

model = Soss.@model () begin
    z ~ Distributions.MvNormal(zeros(10), I)
end
Soss.as(model()) # empty transform tuple

Any help on if this is a bug or an API update appreciated!

@marius311
Copy link
Author

Any chance I could get some guidance on this one?

@cscherrer
Copy link
Owner

Hi @marius311 , sorry to leave you hanging. Digging into this now...

@cscherrer cscherrer self-assigned this Jul 21, 2022
@cscherrer cscherrer mentioned this issue Jul 21, 2022
@cscherrer
Copy link
Owner

I fixed it up, and added this to the tests:

    @testset "https://github.com/cscherrer/Soss.jl/issues/342" begin
        m = Soss.@model () begin
            z ~ Dists.MvNormal(zeros(10), I)
        end
        t = Soss.as(m()) 
        @test TV.transform(t, zeros(10)) == (z = zeros(10), )
    end

@marius311
Copy link
Author

Awesome, thanks! Will take a look.

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 a pull request may close this issue.

2 participants