Skip to content
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

Define a Python source which receives a reference to a subscriber #496

Merged
merged 9 commits into from
Sep 11, 2024

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Aug 30, 2024

Description

  • Allows a Python generator source to check if the subscriber is still subscribed.
  • Define a class SubscriberFuncWrapper for Python sources rather than just a lambda. The reason is that python objects captured by the lambda need to be destroyed while the gil is held, which causes a problem if the lambda is destroyed unexpectedly.
  • Update conftest.py to set the loglevel to DEBUG if the GLOG_v environment variable is defined.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

…fine a class SubscriberFuncWrapper rather than just a lambda. The reason is that python objects captured by the lambda need to be destroyed while the gil is held, which causes a problem if the lambda is destroyed unexpectedly.
@dagardner-nv dagardner-nv added improvement Improvement to existing functionality non-breaking Non-breaking change labels Aug 30, 2024
@dagardner-nv dagardner-nv self-assigned this Aug 30, 2024
@dagardner-nv dagardner-nv requested a review from a team as a code owner August 30, 2024 22:13
python/mrc/_pymrc/include/pymrc/segment.hpp Outdated Show resolved Hide resolved
python/mrc/_pymrc/src/segment.cpp Outdated Show resolved Hide resolved
python/mrc/core/segment.cpp Outdated Show resolved Hide resolved
python/tests/test_executor.py Show resolved Hide resolved
@mdemoret-nv
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 8489b45 into nv-morpheus:branch-24.10 Sep 11, 2024
18 checks passed
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 73.07692% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.09%. Comparing base (ca8a73f) to head (4995873).
Report is 1 commits behind head on branch-24.10.

Files with missing lines Patch % Lines
python/mrc/_pymrc/src/segment.cpp 70.83% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-24.10     #496      +/-   ##
================================================
+ Coverage         74.06%   74.09%   +0.03%     
================================================
  Files               403      403              
  Lines             14403    14424      +21     
  Branches           1132     1134       +2     
================================================
+ Hits              10667    10688      +21     
  Misses             3736     3736              
Flag Coverage Δ
cpp 70.69% <7.69%> (-0.12%) ⬇️
py 42.59% <79.16%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
python/mrc/_pymrc/include/pymrc/segment.hpp 62.50% <ø> (ø)
python/mrc/core/segment.cpp 95.83% <100.00%> (+0.08%) ⬆️
python/mrc/_pymrc/src/segment.cpp 80.22% <70.83%> (-1.48%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca8a73f...4995873. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing functionality non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants