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

First pass for speeding up graph and evidence operations #84

Merged
merged 8 commits into from
Oct 20, 2021

Conversation

StannisZhou
Copy link
Contributor

First PR for #18. Main changes include:

  1. Implement a customized __hash__ function for FactorGraph, and turn properties into cached properties.
  2. Allow directly setting evidence using numpy arrays for NDVariableArray. To implement this we need to turn all _vars_to_starts into OrderedDict to make sure the section for each variable group in evidence is contiguous.

Also renamed GenericVariableGroup to VariableDict (see 1st bullet in #71).

Copy link
Contributor

@NishanthJKumar NishanthJKumar left a comment

Choose a reason for hiding this comment

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

LGTM! Great work - seems like it really simplifies things 😄

pgmax/fg/graph.py Show resolved Hide resolved
@StannisZhou StannisZhou merged commit 57afe77 into vicariousinc:master Oct 20, 2021
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