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

Do not override the optimizer's default parameters #142

Closed timokau closed 4 years ago

timokau commented 4 years ago

Description

As discussed in https://github.com/kiudee/cs-ranking/pull/119. The reasoning is that we don't have good reason to override those, the library user will likely have to tune them anyways (or use a different optimizer altogether). At the same time, they make the design proposed in #119 (passing uninitialized optimizers and their parameters separately) more difficult.

Motivation and Context

https://github.com/kiudee/cs-ranking/pull/119#issuecomment-639525631

How Has This Been Tested?

Tests & pre-commit hooks.

Does this close/impact existing issues?

Part of #119 and thus part of #116.

Types of changes

Checklist:

codecov[bot] commented 4 years ago

Codecov Report

Merging #142 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #142   +/-   ##
=======================================
  Coverage   59.96%   59.96%           
=======================================
  Files         116      116           
  Lines        7658     7658           
=======================================
  Hits         4592     4592           
  Misses       3066     3066           
Impacted Files Coverage Δ
csrank/choicefunction/cmpnet_choice.py 84.78% <ø> (ø)
csrank/choicefunction/fate_choice.py 91.30% <ø> (ø)
csrank/choicefunction/feta_choice.py 66.00% <ø> (ø)
csrank/choicefunction/ranknet_choice.py 81.63% <ø> (ø)
csrank/core/cmpnet_core.py 87.61% <ø> (ø)
csrank/core/fate_network.py 68.30% <ø> (ø)
csrank/core/feta_network.py 62.84% <ø> (ø)
csrank/core/ranknet_core.py 87.06% <ø> (ø)
csrank/discretechoice/cmpnet_discrete_choice.py 86.84% <ø> (ø)
csrank/discretechoice/fate_discrete_choice.py 94.44% <ø> (ø)
... and 7 more