ReactiveMP.jl icon indicating copy to clipboard operation
ReactiveMP.jl copied to clipboard

Keyword arguments not supported in non-linear node

Open bartvanerp opened this issue 1 year ago • 3 comments

The non-linear node does not support keyword arguments, e.g.

function foo(x1, x2; b=0)
    return x1 + x2 + b
end

@model function model_test(b)
    z1 ~ NormalMeanVariance(0.0, 1.0)
    z2 ~ NormalMeanVariance(0.0, 1.0)
    x ~ foo(z1, z2; b=b)
    y = datavar(Float64)
    y ~ NormalMeanVariance(x, 1.0)
end

fails with LoadError: Unknown option '$(Expr(:kw, :b, :b))' for 'foo' node.

bartvanerp avatar May 30 '23 07:05 bartvanerp