hotg-ai / rune

Rune provides containers to encapsulate and deploy edgeML pipelines and applications
Apache License 2.0
134 stars 15 forks source link

Make the compiler's internals deterministic #348

Open Michael-F-Bryan opened 3 years ago

Michael-F-Bryan commented 3 years ago

While implementing #345 we added a fairly benign test to make sure the right error message is emitted when making sure our pipeline is a DAG and has no loops.

Error Cycle detected when checking "another_model"
1 │ version: 1
  │ ^
  │
  = ... which passes data to "some_model"...
  = ... which passes data to "another_model", completing the cycle.

However, about half the instead of saying there is a cycle between another_model -> some_model -> another_model, it'll say the cycle is some_model -> another_model -> some_model, which makes the test fail spuriously.

I'm guessing this is because queries aren't guaranteed to yield entities in the same order every time, because even when we switch all HashMaps to IndexMaps the test will spuriously fail.