Conversation
|
I would have much preferred that we just exploited common subexpressions within a single call to Then there's no model-level state that we are tracking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4204 +/- ##
==========================================
+ Coverage 99.95% 99.96% +0.01%
==========================================
Files 43 43
Lines 6306 6313 +7
==========================================
+ Hits 6303 6311 +8
+ Misses 3 2 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
To avoid keeping expressions alive, something like a WeakKeyDict is useful. It uses |
|
I need to:
|
|
Closing because I don't like this. At minimum, we can do something like #4207. Or maybe WeakRef + |
Closes #4203
I didn't realise
objectidcould be re-used, but I guess it makes sense. It's not documented very well.But this is exactly what I didn't want to happen, because we don't want to keep every single subexpression alive for the life of the model. That could be a big increase in memory usage.
One option is to make the subexpression storage opt-in.