-
Notifications
You must be signed in to change notification settings - Fork 161
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
Update ControlMessage
to hold arbitrary Python objects & update MessageMeta
to copy & slice
#1637
Update ControlMessage
to hold arbitrary Python objects & update MessageMeta
to copy & slice
#1637
Conversation
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.
set_metadata
andget_metadata
should return aJSONValues
object.- Same with Tasks
ControlMessage
to use JsonValue
and MessageMeta
to copy & sliceControlMessage
to hold arbitrary Python objects & update MessageMeta
to copy & slice
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.
Looking good but lets build on this. Other things we should be thinking of here:
- How could we possibly break this code? Lets make tests to try and break it and fix the implementation if they succeed. Try different types of objects, overwriting objects, deleting objects, etc.
- Can we verify that the python object was destroyed if we erase the key that is holding it?
- What other utility functions would developers want when working with these objects?
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.
Update the type casters in include/morpheus/pybind11/json.hpp
to use your new type.
…te-ControlMessage
…to yuchen-update-ControlMessage
/merge |
26c95e1
into
nv-morpheus:branch-24.06
Description
For ControlMessage, use a specialization of
nlohmann::basic_json
to hold arbitrary Python objects form_metadata
&m_tasks
Implement dataframe slicing method for
MessageMeta
which is equivalent to copy_meta_ranges() in MultiMessage. The method will do copy & slicing to the original dataframe, instead of sharing the ownership.By Submitting this PR I confirm: