Add JSONValues container for holding Python values as JSON objects if possible, and as pybind11::object otherwise#455
Merged
rapids-bot[bot] merged 44 commits intoApr 3, 2024
Conversation
…ception Remove uneeded as_string method
…al with unsupported objects
…devin-json-serializable
…alized python objects
drobison00
reviewed
Mar 13, 2024
…methods to check if the object is holding unserializable objects, and the ability to return a json doc
mdemoret-nv
requested changes
Mar 27, 2024
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## branch-24.06 #455 +/- ##
================================================
+ Coverage 73.68% 73.77% +0.09%
================================================
Files 400 402 +2
Lines 14275 14395 +120
Branches 1113 1129 +16
================================================
+ Hits 10518 10620 +102
- Misses 3757 3775 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
mdemoret-nv
approved these changes
Apr 3, 2024
Contributor
|
/merge |
rapids-bot Bot
pushed a commit
to nv-morpheus/Morpheus
that referenced
this pull request
Apr 5, 2024
* Contains breaking changes for the C++ API * No breaking changes for the Python API * Updates `nlohmann_json from` 3.9 to 3.11 for `patch_inplace` method. * Requires nv-morpheus/MRC#455 to be merged first Closes #1560 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md). - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: #1589
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
unserializable_handler_fncallback tomrc::pymrc::cast_from_pyobjectwhich will be invoked for any unsupported Python object. Allowing for serializing unsupported object.ex:
Add
JSONValuescontainer class which is an immutable container for holding Python values asnlohmann::jsonobjects if possible, and aspybind11::objectotherwise. The container can be copied and moved, but the underlyingnlohmann::jsonobject is immutable.Updates
nlohmann_jsonfrom 3.9 to 3.11 forpatch_inplacemethod.Incorporates ideas from @drobison00's PR Update PythonObjectCache to support get and pop operations, update utils to allow passing of cached python objects. #417 with three key differences:
cast_from_pyobjectare opt-in whenunserializable_handler_fnis provided, otherwise there is no behavior change to the method.JSONValuesrather than a global cache.This PR is related to nv-morpheus/Morpheus#1560
Checklist