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

give each multipledispatch-registered implementation a unique name #1496

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

st--
Copy link
Member

@st-- st-- commented Jun 4, 2020

so that docs are generated correctly. resolves #1494

@st-- st-- requested review from vdutor and awav June 4, 2020 11:53
@codecov
Copy link

codecov bot commented Jun 4, 2020

Codecov Report

Merging #1496 into develop will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1496   +/-   ##
========================================
  Coverage    95.08%   95.08%           
========================================
  Files           85       85           
  Lines         3782     3784    +2     
========================================
+ Hits          3596     3598    +2     
  Misses         186      186           
Impacted Files Coverage Δ
gpflow/conditionals/multioutput/conditionals.py 88.23% <ø> (ø)
gpflow/conditionals/conditionals.py 100.00% <100.00%> (ø)
...ow/conditionals/multioutput/sample_conditionals.py 100.00% <100.00%> (ø)
gpflow/conditionals/sample_conditionals.py 94.11% <100.00%> (ø)
gpflow/covariances/kufs.py 100.00% <100.00%> (ø)
gpflow/covariances/kuus.py 100.00% <100.00%> (ø)
gpflow/covariances/multioutput/kufs.py 90.62% <100.00%> (+0.30%) ⬆️
gpflow/covariances/multioutput/kuus.py 100.00% <100.00%> (ø)
gpflow/expectations/cross_kernels.py 97.61% <100.00%> (ø)
gpflow/expectations/linears.py 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

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

Copy link
Contributor

@vdutor vdutor left a 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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def plain_conditional(
def conditional__object__Kernel(

@@ -71,7 +73,7 @@ def _Kuf(
LinearCoregionalization,
object,
)
def _Kuf(
def _Kuf__Fallback__LinearCoregionalization(
Copy link
Contributor

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?

Copy link
Member

@awav awav left a 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.

@st--
Copy link
Member Author

st-- commented Jun 10, 2020

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.

@st--
Copy link
Member Author

st-- commented Jun 23, 2020

@awav would you be satisfied by "simply replace all double-underscores with single-underscores"?
@vdutor what's the minimum that'd satisfy you to approve this PR?

@st-- st-- requested review from insysion, vdutor and awav July 2, 2020 10:22
@insysion insysion self-assigned this Jul 16, 2020
@insysion
Copy link
Contributor

I'll be addressing the concerns of @awav and @vdutor week beginning 28th October

@st-- st-- added the bug label Oct 5, 2020
@vdutor
Copy link
Contributor

vdutor commented Nov 18, 2020

@insysion, are you still planning to do this?

@insysion insysion removed their assignment Oct 4, 2021
Copy link
Contributor

@insysion insysion left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for _conditional function incorrect
4 participants