kiudee / cs-ranking

Context-sensitive ranking and choice in Python with PyTorch
https://cs-ranking.readthedocs.io
Apache License 2.0
66 stars 15 forks source link

Misc fixes for default-constructibility of our learners #144

Closed timokau closed 4 years ago

timokau commented 4 years ago

Description

Pulling out the changes of https://github.com/kiudee/cs-ranking/pull/116 that are ready for merge now. As I said in https://github.com/kiudee/cs-ranking/pull/116#issuecomment-650589268, this brings us very close to passing the "default-constructible" test. I think/hope that will be the highest hurdle for sklearn api compatibility.

Outstanding issues are the kernel-regularizers and https://github.com/scikit-learn/scikit-learn/issues/17756.

Motivation and Context

See #116.

How Has This Been Tested?

Linters & tests.

Does this close/impact existing issues?

Impacts #116, but doesn't close it.

Types of changes

Checklist:

timokau commented 4 years ago

Removing the regularizer default overrides is a small breaking change (analogous to #142).

codecov[bot] commented 4 years ago

Codecov Report

Merging #144 into master will increase coverage by 0.03%. The diff coverage is 70.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   60.08%   60.11%   +0.03%     
==========================================
  Files         116      116              
  Lines        7662     7668       +6     
==========================================
+ Hits         4604     4610       +6     
  Misses       3058     3058              
Impacted Files Coverage Δ
csrank/choicefunction/cmpnet_choice.py 84.78% <ø> (ø)
csrank/choicefunction/fate_choice.py 91.30% <ø> (ø)
csrank/choicefunction/ranknet_choice.py 81.63% <ø> (ø)
csrank/core/cmpnet_core.py 89.28% <ø> (ø)
csrank/core/fate_network.py 69.19% <ø> (ø)
csrank/core/feta_linear.py 92.24% <ø> (ø)
csrank/core/ranknet_core.py 88.69% <ø> (ø)
csrank/discretechoice/cmpnet_discrete_choice.py 86.84% <ø> (ø)
csrank/discretechoice/fate_discrete_choice.py 94.44% <ø> (ø)
csrank/discretechoice/ranknet_discrete_choice.py 84.61% <ø> (ø)
... and 14 more
timokau commented 4 years ago

Code coverage is only decreasing because of the black changes and doc additions.

timokau commented 4 years ago

Thanks for the feedback, I addressed all your comments. Please have another look.