Skip to content

[BUG] y not being normalized when using EncoderNormalizer in EncoderDecoderDataModule #2360

Description

@phoeenniixx

Currently, in EncoderDecoderDataModule, y is not normalized if we are using EncoderNormalizer as it is fitted per sequence (during __getitem__). In this case we only normalize target_past and forgot to normalize the decoder indices of the target.

See here, we just normalize target_past and not the decoder indices (or y):

if normalizer is not None and normalizer.fit_per_sequence:
target_past = (
self.data_module._target_normalizer.fit_transform_sequence(
target_past
)
)

y remains raw:

y = data["target"][decoder_indices]
if y.shape[-1] > 1:
y = [y[:, i] for i in range(y.shape[-1])]
else:
y = y.squeeze(-1)
return x, y

Solution

We should normalize y as well

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Needs triage & validation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions