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

[Draft] Allow contraction for composite nodes #330

Closed
wants to merge 0 commits into from

Conversation

blolt
Copy link
Contributor

@blolt blolt commented Jul 21, 2024

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

@bvdmitri
Copy link
Member

bvdmitri commented Jul 22, 2024

Amazing work @blolt ! I'll be able to review your PR later, additionally I requested review from @wouterwln

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.

Allow contraction of composite nodes
2 participants