RxInfer.jl
RxInfer.jl copied to clipboard
[Draft] Allow contraction for composite nodes
Overview
This PR resolves #287, allowing the user to specify custom composite node contraction through an argument on the infer function and an implementation of GraphPPL.NodeType
.
Testing
Two unit tests have been created to test this functionality. The first is a simple test to confirm that the RxInfer backend can be parameterized, and the second tests the infer function on an HGF with contracted nodes. The second unit test, "Static Inference With Node Contraction"
is currently failing with the following error:
ERROR: The `gcv` model macro does not support positional arguments. Use keyword arguments `gcv(κ = ..., ω = ..., z = ..., x = ..., y = ...)` instead.
However, all keyword arguments are being used for the gcv
macro, so it seems likely that the issue lies elsewhere. I have tried different approaches, but none so far have bore fruit (a passing hgf unit test).