-
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] Change how ValueProducer callbacks work #22470
[py systems] Change how ValueProducer callbacks work #22470
Conversation
14c394c
to
829f00c
Compare
Do you want to assign a feature reviewer for this, Jeremy? |
Sadly, I think we need to pile another feature review on +@rpoyner-tri, unless @EricCousineau-TRI wants to jump in? This can wait until next week, it's not blocking anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature, can also serve as platform if desired - thanks!
Reviewed 8 of 8 files at r1.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform), needs at least two assigned reviewers
Thanks! I think extra eyes are good in this case, so +@SeanCurtis-TRI for platform per schedule, please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion
bindings/pydrake/systems/value_producer_pybind.cc
line 6 at r1 (raw file):
namespace pydrake { // The C++ framework uses ValueProducer::AllocateCallback to allocate storage
nit: This is copied verbatim from the header. Do you want it both places?
(1) Add better error reporting in case the user's function is incorrectly implemented or otherwise misbehaves. (2) Don't rely on pybind11 to cast the result of allocate() to a unique_ptr (this is an RLG/pybind11-specific feature).
829f00c
to
16c09a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion
(1) Add better error reporting in case the user's function is incorrectly implemented or otherwise misbehaves.
(2) Don't rely on pybind11 to cast the result of allocate() to a unique_ptr (this is an RLG/pybind11-specific feature).
Towards #21968.
This change is