ott-jax/ott

Throw an error if `scale_cost!=1.0` in `geometry.Geodesic`

MUCDK opened this issue · 2 comments

MUCDK commented

Is your feature request related to a problem? Please describe.
In Geodesic, the scale_cost argument has no effect.

Describe the solution you'd like
To prevent misunderstandings, I suggest to throw an error if scale_cost!=1.0 in geometry.Geodesic.from_graph.

Describe alternatives you've considered
None

Additional context
None

This can be a bit problematic, since scale_cost could also be traced, so we cannot throw an error at compile-time and I don't wanna introduce runtime value checks, unless necessary.
The cleanest way would be to:

  1. pass scale_cost=1.0 always to the parent as kwargs['scale_cost'] = 1.0
  2. refactor the geometry and removing scale_cost altogether from Geodesic

The 1st is easily doable, wanna take a stab at it @MUCDK ? Ultimately, I want to do 2., but it will take much longer.

I can do it, but would would prioitize #468 for now.