[BUG] Fix y not being normalized when using EncoderNormalizer - #2393
Open
AmjadAAYD wants to merge 4 commits into
Open
[BUG] Fix y not being normalized when using EncoderNormalizer#2393AmjadAAYD wants to merge 4 commits into
AmjadAAYD wants to merge 4 commits into
Conversation
AmjadAAYD
requested review from
benHeid,
fkiraly,
jdb78 and
phoeenniixx
as code owners
August 22, 2026 18:26
phoeenniixx
requested changes
Aug 23, 2026
phoeenniixx
left a comment
Member
There was a problem hiding this comment.
can you please make sure that code quality is passing?
AmjadAAYD
force-pushed
the
fix-encoder-normalizer-decoder-target
branch
from
August 23, 2026 20:09
84d5de1 to
661f414
Compare
Author
|
Fixed, was just line-length + a formatting nit. Rebased on main too. Code-quality should pass now. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2393 +/- ##
=======================================
Coverage ? 88.14%
=======================================
Files ? 196
Lines ? 11063
Branches ? 0
=======================================
Hits ? 9751
Misses ? 1312
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
Fixed the coverage gap too, turned out to be dead code (a shape guard that could never actually trigger for real multi-target data), removed it . |
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.
Fixes #2360. When using EncoderNormalizer (fit per encoder window, not globally), target_past was normalized at getitem time but the decoder target y was left raw, so the model was trained to predict the raw scale while being fed a normalized encoder input. Fixed by transforming y with the same per-sequence-fitted normalizer used for target_past. For the multi-target case, added a transform_sequence() method on ScalerAdapter mirroring fit_transform_sequence()'s per-column logic (only transform sub-normalizers that are fit_per_sequence, leave the globally-normalized ones untouched) instead of naively calling the top-level transform(), which broke GroupNormalizer sub-adapters that need group columns X. Added a regression test (test_encoder_normalizer_scales_decoder_target) verifying y now matches normalizer.transform() of the raw decoder target. Full test_data_module.py suite passes (43 passed).