-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py systems: Ensure usage plays well with caching (invalidation) #7793
Comments
To list potential solutions:
* May still require changes to core EDIT: Updated with Sherm's alternative. |
Possible alternative:
|
Thanks! I'd be hesitant to limit mutators in Python to For large vectors, that means you're now required to always copy when you only want to change a small bit. Caveat: For NumPy arrays with So with that said, maybe ensuring that |
I've thrown together a prototype for the I believe this could then be handled with custom wrappings of I have a prototype of doing this wrapping here: |
@sherm1 Here's a prototype of teaching Python and How does this look to you? |
Sorry, @EricCousineau-TRI -- I'm unable to extrapolate from that code what it would mean in practice in Drake. I don't have an opinion about how it should look in Python; my concern is just that we must avoid unintentional invalidation. |
Hup, sorry about that! |
Follow-up slack convo: https://drakedevelopers.slack.com/archives/C3YB3EV5W/p1549562118060400 Discussion is about on par with prior discussion: Either use getters / setters, or propagate At some point in the future, I need to draw up a minor usability doc and all edge cases to more explicitly capture pain points with both solutions. |
I'm not sure if I've seen people get bit by this. We have the (production-level) code ready for this if it ever arises, but less work is always nicer. Closing for now, and may consider removing |
This came up in Drake Slack: https://drakedevelopers.slack.com/archives/C3YB3EV5W/p1626366534036100 (\cc @rpoyner-tri) FTR |
Per discussion here and on slack, copying transcript(s):
From @RussTedrake:
From me:
From @jwnimmer-tri:
From me:
From @jwnimmer-tri:
From me:
From @jwnimmer-tri:
\cc @amcastro-tri
The text was updated successfully, but these errors were encountered: