diprism / fggs

Factor Graph Grammars in Python
MIT License
13 stars 3 forks source link

Assignment data structure for factor graphs #57

Closed darcey closed 2 years ago

darcey commented 3 years ago

A while ago, I remember we talked about needing this. I guess we should implement it at some point / think about how it should fit into the code structure.

darcey commented 2 years ago

Hey, just noticed this bug was still open. From what I remember: each Node used to have a field called "value", which stored that Node's assignment (or None, if it was unassigned). David convinced me that it would be better to store assignments elsewhere, in a separate data structure, so we removed all the Node.value stuff from the code.

Was an assignment data structure ever implemented? Is there a reason why it's less necessary than it originally seemed? (Guess I should tag @davidweichiang.)

davidweichiang commented 2 years ago

No, this has never been implemented and isn’t needed for the finite-domain sum-product code.

On Dec 5, 2021, at 13:19, Darcey Riley @.***> wrote:

 Hey, just noticed this bug was still open. From what I remember: each Node used to have a field called "value", which stored that Node's assignment (or None, if it was unassigned). David convinced me that it would be better to store assignments elsewhere, in a separate data structure, so we removed all the Node.value stuff from the code.

Was an assignment data structure ever implemented? Is there a reason why it's less necessary than it originally seemed? (Guess I should tag @davidweichiang.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

darcey commented 2 years ago

Hmm, do you think there are other places where we might need it?

davidweichiang commented 2 years ago

I guess we would need something like it for a Viterbi-style algorithm and/or random sampling.

darcey commented 2 years ago

Aha, hmm. Seems like, in that case, we should probably just wait until we're implementing those things to add this?

davidweichiang commented 2 years ago

Yeah, I think so.

davidweichiang commented 2 years ago

The assignment data structure is just Dict[Node, Any].

davidweichiang commented 2 years ago

The assignment data structure is just Dict[Node, Any].

davidweichiang commented 2 years ago

Wow, why is everything appearing twice?

davidweichiang commented 2 years ago

Wow, why is everything appearing twice?