Skip to content

Add optimize_last_step_only to coupled LossContributionsConfig#868

Open
jpdunc23 wants to merge 25 commits intomainfrom
feature/coupled-optimize-last-step-only
Open

Add optimize_last_step_only to coupled LossContributionsConfig#868
jpdunc23 wants to merge 25 commits intomainfrom
feature/coupled-optimize-last-step-only

Conversation

@jpdunc23
Copy link
Copy Markdown
Member

@jpdunc23 jpdunc23 commented Feb 23, 2026

Adds optimize_last_step_only boolean to fme.coupled's LossContributionsConfig to allow for optimization of the final output step's loss while ignoring earlier steps. This can be configured independently for the atmosphere and ocean components of the coupled stepper.

Changes:

  • Refactored CoupledStepper.get_prediction_generator() to remove the step_is_optimized argument to reduce coupling between the CoupledStepper and CoupledTrainStepperConfig, since step_is_optimized is a CoupledStepperTrainLoss concern.

  • Tests added

@jpdunc23 jpdunc23 changed the base branch from main to coupled-ft-with-stochastic-atmos February 23, 2026 17:36
jpdunc23 and others added 18 commits April 2, 2026 09:49
…ce into feature/coupled-optimize-last-step-only
…ce into feature/coupled-optimize-last-step-only
…ce into feature/coupled-optimize-last-step-only
…ce into feature/coupled-optimize-last-step-only
…ce into feature/coupled-optimize-last-step-only
Base automatically changed from coupled-ft-with-stochastic-atmos to main April 9, 2026 16:58
Comment on lines +1669 to +1673
optimize = self._loss.step_is_optimized(
"atmosphere",
global_atmos_step,
n_total_atmos_steps,
)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously handled in CoupledStepper.get_prediction_generator() but refactored to be handled here in CoupledTrainStepper._accumulate_loss().

@jpdunc23 jpdunc23 marked this pull request as ready for review April 9, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant