Update flow dependencies
Created by: vloncar
Description
This PR shuffles the order of flows a bit to help resolve the issues observed in #509 and elsewhere. Essentially it makes writer flows depend on the ip flows and expands functionality of apply_flows()
to control how the flows are reapplied if they were already applied before. Another effect of the change is that the flows aren't applied multiple times, an issue that many people have observed.
Type of change
-
Kind of a bug fix since it fixes multiple flows problem -
New feature
Tests
No extra tests are needed. To reproduce the old behavior, just convert any model and call compile()
and build()
and see how many times the same optimizers will be applied (in model._applied_flows
).
Checklist
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. Yeah, right, as if I could prove this.