CITCOM-project / causcumber

Cucumber driven causal inference for testing computational models.
1 stars 1 forks source link

Pygraphviz nondeterminism #32

Open jmafoster1 opened 2 years ago

jmafoster1 commented 2 years ago

Is there any way we can get away from using pygraphviz for causal DAGs? It's nondeterministic in its output, so every time you run anything, you get a "new" causal DAG being output, which git picks up on in the commits. In reality, it's not new at all, just a different order of the same nodes/edges in the .dot file. The alternative here would be to write our own method to output the pygraphviz representation to text which is deterministic, sorting nodes/edges by name or something. That might end up being complicated though, as I like to make use of subgraphs, which adds an extra layer of complication. Possibly a good RSE task.

bobturneruk commented 2 years ago

I wonder if we could, as a stop gap or alternative, set a seed to make it deterministic?