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
give each multipledispatch-registered implementation a unique name #1496
base: develop
Are you sure you want to change the base?
Conversation
… that docs are generated correctly. resolves #1494
Codecov Report
@@ Coverage Diff @@
## develop #1496 +/- ##
========================================
Coverage 95.08% 95.08%
========================================
Files 85 85
Lines 3782 3784 +2
========================================
+ Hits 3596 3598 +2
Misses 186 186
Continue to review full report at Codecov.
|
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.
Naming is unique but not really consistent across different multiple-dispatch methods. Can we follow one convention like, for example, _name__Type1__Type2
?
@@ -12,7 +10,7 @@ | |||
|
|||
|
|||
@conditional.register(object, InducingVariables, Kernel, object) | |||
def _conditional( | |||
def single_output_conditional( |
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.
def single_output_conditional( | |
def conditional__InducingVariables__Kernel( |
@@ -64,7 +62,7 @@ def _conditional( | |||
|
|||
|
|||
@conditional.register(object, object, Kernel, object) | |||
def _conditional( | |||
def plain_conditional( |
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.
def plain_conditional( | |
def conditional__object__Kernel( |
@@ -71,7 +73,7 @@ def _Kuf( | |||
LinearCoregionalization, | |||
object, | |||
) | |||
def _Kuf( | |||
def _Kuf__Fallback__LinearCoregionalization( |
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.
Are you sure about the fallback here?
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.
I recommend reconsidering names. At least remove double underscores. Often in names, you cannot encode all combinations.
Names weren't consistent beforehand, either, and they're not really needed for anything specific. However, giving them unique names (note- names only need to be unique within a given python module) fixes the bug in our documentation, so can we please figure out something simple that makes it work as opposed to trying to find a perfect solution? I don't think it's worth the effort making everything fully consistent across the code-base. It's not practically feasible to encode all combinations. Sometimes we register the same implementation for different type pairs. |
@insysion, are you still planning to do this? |
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.
Leaving a comment to remove me from requested reviews
so that docs are generated correctly. resolves #1494