diprism / fggs

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

Command-line invocation #42

Closed colin-mcd closed 3 years ago

davidweichiang commented 3 years ago

Let's use argparse instead of parsing the command line manually.

davidweichiang commented 3 years ago

I am not sure if it should be called infer.py or not because "inference" sounds broader to me than what this script does, or is it? @darcey do you have any opinion?

darcey commented 3 years ago

@davidweichiang what exactly does the script do? Run exact inference for a particular FGG? I'm not sure about names. Maybe run_exact_inference.py? But that's much longer. Anyway, I have no strong opinion, so whatever you guys decide on is ok by me!

colin-mcd commented 3 years ago

Yeah feel free to scrap this if it isn't what you were thinking... I just threw it together in like 15 minutes, and didn't give it much thought :P

darcey commented 3 years ago

@HerbertMcSnout, if that's addressed at me, I am definitely not asking you to scrap anything! I'm not familiar with what you're working on right now, which is why I defer to David on the review. (That's not to say I'm not curious what this code does; I would love to hear more about what you're working on! But you don't need my approval for this code. My only request, reviewing-wise, is that if you ever modify domains.py, factors.py, fggs.py, or conjunction.py, I would like to be included as a reviewer then.)

davidweichiang commented 3 years ago

I rebased this to #43 and made a mess as usual.

The script now lives in bin/sum_product.py and doesn't let you specify factors on the command line. But I'll create a separate issue about this.