-
Notifications
You must be signed in to change notification settings - Fork 320
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
DelegateParameter infer methods to find root parameters, instruments, and channels #5998
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5998 +/- ##
==========================================
+ Coverage 67.43% 67.48% +0.04%
==========================================
Files 349 350 +1
Lines 30211 30296 +85
==========================================
+ Hits 20374 20445 +71
- Misses 9837 9851 +14 ☔ View full report in Codecov by Sentry. |
Fix mypy errors for 3.9
Add more code coverage in tests
While writing tests, I realized there is a possibility for a DelegateParameter "loop" which would cause both There are certainly ways I could stop this, but I'm not sure the case is likely enough to bother with at this time. I invite other perspectives on the matter. |
I think it’d be useful to prevent the loops or at least error out when loops are discovered because that will be a welcoming and helpful user experience, so I’d encourage to do it |
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.
Left some comments inline
|
- Move to extensions module - Less verbose members of InferAttrs - rename to infer_instrument_module - Fix legacy import locations
Expand docstrings
Fix bug from adding loop detection Move tests
This PR adds methods to recursively search a chain of DelegateParameters with the aim of finding the root parameter. This also allows users to infer the InstrumentModule or Instrument that a chain of DelegateParameters stems from.
These methods also allow the user to customize which attributes of a Parameter link to other parameters.