ml4ai / delphi

Framework for assembling causal probabilistic models from text and software.
http://ml4ai.github.io/delphi
Apache License 2.0
24 stars 17 forks source link

Made reported model status consistent. #550

Closed manujinda closed 2 years ago

manujinda commented 2 years ago

Delphi was reporting that a model is ready when model status REST API endpoint is queried while the model is being trained after a edit edges call.

This happened since we did not write the edge weight set model back to delphi.db and we do not reset the model status as not trained just after an edge was edited.

Fixed this issue.

When generating the model status for a trained model, we were reporting the average of sampled thetas for each edge even when the edge is frozen. Changed this to directly report the value a frozen edge is set at.

NOTE: Reporting the average of sampled thetas for a frozen edge becomes handy for debugging purposes.