From review on #313, Marcus asked for two changes to how IT-opt's regularizers are written.
Move LatentAnchor into core/rewards/ — it currently sits in core/scalers/latent_optimization.py:99. It is regularization in the form of a reward, so it belongs with the other rewards where it is reusable and can be combined with them (comment). Blocker: its input is latents, not coordinates, so it does not fit RewardFunctionProtocol as written — the protocol has to admit latent-space terms first.
Flip BondGeometryReward to a reward to be maximized — core/rewards/geometry.py:60. It is written as a penalty today, and a term that only works when minimized won't compose with the other rewards (comment).
Note before doing this: RealSpaceDensityReward returns an L1/MSE loss (core/rewards/real_space_density.py:221-223) and is minimized, so the package's existing "rewards" are really losses. Flipping only the geometry term puts the two on opposite signs — pick one convention for the whole package.
From review on #313, Marcus asked for two changes to how IT-opt's regularizers are written.
Move LatentAnchor into core/rewards/ — it currently sits in core/scalers/latent_optimization.py:99. It is regularization in the form of a reward, so it belongs with the other rewards where it is reusable and can be combined with them (comment). Blocker: its input is latents, not coordinates, so it does not fit RewardFunctionProtocol as written — the protocol has to admit latent-space terms first.
Flip BondGeometryReward to a reward to be maximized — core/rewards/geometry.py:60. It is written as a penalty today, and a term that only works when minimized won't compose with the other rewards (comment).
Note before doing this: RealSpaceDensityReward returns an L1/MSE loss (core/rewards/real_space_density.py:221-223) and is minimized, so the package's existing "rewards" are really losses. Flipping only the geometry term puts the two on opposite signs — pick one convention for the whole package.