facebookresearch / beanmachine

A library that allows for inference on probabilistic models
https://beanmachine.org/
MIT License
264 stars 49 forks source link

minibmg: implement factories for Graph2 #1755

Closed gafter closed 1 year ago

gafter commented 1 year ago

Summary: This is step 3c (below) in a series of refactoring steps that will replace minibmg nodes with a distinct node type for each operations and a visitor mechanism. The idea is that we will write replacements for all of the parts of minibmg using the new paradigm, and then switch over the tests to the new code.

  1. Introduce Node2 and Node2Visitor (without tests yet)
  2. Introduce Graph2 using Node2 with json I/O (ditto)
  3. Introduce Tracing2 using Node2 (ditto) 3a. Introduce pretty-printing for Node2 (ditto) 3b. Minor fixup to the json implementation 3c. Implement Graph2::Factory
  4. Introduce Eval2 (ditto)
  5. Migrate tests to Node2.
  6. Migrate any remaining pieces to Node2.
  7. Delete Node.h and Node.cpp and other things that have been replaced.
  8. Rename Node2 to Node and similarly for other types and files.

Differential Revision: D40436160

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D40436160