ott icon indicating copy to clipboard operation
ott copied to clipboard

Additional Docstrings and Comments to `NeuralDual`-Module

Open bunnech opened this issue 2 years ago • 1 comments

Addressing issues # 110 and #105, this is a small pull request adding more docstrings and comments to the existing code 👀.

bunnech avatar Aug 16 '22 19:08 bunnech

Codecov Report

Merging #122 (76c7420) into main (00f4f87) will not change coverage. The diff coverage is 54.54%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage   89.05%   89.05%           
=======================================
  Files          45       45           
  Lines        4293     4293           
  Branches      469      469           
=======================================
  Hits         3823     3823           
  Misses        358      358           
  Partials      112      112           
Impacted Files Coverage Δ
ott/core/icnn.py 65.82% <50.00%> (ø)
ott/core/neuraldual.py 68.32% <66.66%> (ø)

codecov-commenter avatar Aug 16 '22 20:08 codecov-commenter

Minor, I assume best practice is to import the module not the class or function https://github.com/ott-jax/ott/blob/5657e786c99afb808edd98e061ec316eed0942be/ott/core/icnn.py#L26

JTT94 avatar Aug 19 '22 10:08 JTT94

Thanks for your comments @michalk8 and James. I hope you are enjoying the summer! I also updated two lines of CONTRIBUTING.md as this seemed outdated.

Let me know if we are ready to merge!

bunnech avatar Aug 20 '22 19:08 bunnech

Could you please use :cite:bunne:22 here and fix the typo here? Maybe even :cite:amos:17 here, but I'm just being picky (this doesn't get rendered).

Done, but added :cite:amos:17 in the documentation, not the file title.

Furthermore, would be nice to:

  • type NeuralDualSolver.{clip_weights_icnn,penalize_weights_icnn} and document them or make them private (if they are supposed to be used internally only)
  • same for `ICNN.compute_{gaussian,identity}_map

Done, I made them private. Not sure what you want exactly.

bunnech avatar Aug 21 '22 20:08 bunnech

LGTM, thanks a lot @bunnech !

michalk8 avatar Aug 22 '22 08:08 michalk8