Draft
Conversation
mcgibbon
reviewed
Mar 27, 2026
fme/ace/stepper/single_module.py
Outdated
| ) | ||
| step_loss = self._loss_obj(gen_step, target_step, step=step) | ||
| metrics[f"loss_step_{step}"] = step_loss.detach() | ||
| step_total = step_loss.sum() |
Contributor
There was a problem hiding this comment.
nit: step total what?
Suggested change
| step_total = step_loss.sum() | |
| step_total_loss = step_loss.sum() |
May want to rename step_loss to step_channel_loss if you do this, but also if you do the all reductions here (like we discussed earlier), having them here should make it clear.
fme/coupled/loss.py
Outdated
| prediction.data, target_data, prediction.step | ||
| return ( | ||
| self._weight | ||
| * self._loss(prediction.data, target_data, prediction.step).sum() |
Contributor
There was a problem hiding this comment.
What we discussed was having the loss take in a reduce argument, and passing reduce=False for the ace case, which would avoid needing to do anything here (though coupled wouldn't get access to these improvements, either).
Arcomano1234
commented
Mar 31, 2026
| gen_step, target_step, step=step, reduce=False | ||
| ) | ||
| step_total_loss = step_loss.sum() | ||
| metrics[f"loss_step_{step}"] = step_total_loss.detach() |
Contributor
Author
There was a problem hiding this comment.
These changes are temporary and will be moved to per-channel reductions with the other per-channel loss PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of why the PR is needed and how it satisfies those requirements, in sentence form.
Changes:
symbol (e.g.
fme.core.my_function) or script and concise description of changes or added featureCan group multiple related symbols on a single bullet
Tests added
If dependencies changed, "deps only" image rebuilt and "latest_deps_only_image.txt" file updated
Resolves # (delete if none)