Hacker News new | ask | show | jobs
by type_enthusiast 2426 days ago
If you mutate an object itself, we can't really track that. There's no magic going on; you can break the state if you use mutable objects. It's less of an issue in Scala where immutable data structures are the norm, but I can imagine it would be disappointing in Python.

Currently it takes a shallow copy of the state output by each cell, meaning every value is going to be a primitive value or a reference. If it's a reference to mutable state, you're kind of on your own with respect to keeping reproducibility. I felt like this was a good compromise between strictly enforced reproducibility and practicality; if it turns out to be confusing we could consider deep copying the state, or having an option to do that (I could imagine it being pretty bad for efficiency in a lot of ML use cases, though).

1 comments

I am not familiar with those notenooks. What would be wrong with re-executing all the cells below the one that changed?
That is usually a feature. The reason it's not the default everytime you change a cell if that cells can contain long running calculations.