Skip to content

Unexpected warnings with Standardize in ChainedOutcomeTransform #2812

Closed
@Balandat

Description

@Balandat

Discussed in #2811

Originally posted by samuelkim16 April 8, 2025
I'd like to use multiple outcome transforms. A snippet of my code looks like this:

import botorch.models.transforms as transforms

outcome_transform = transforms.outcome.ChainedOutcomeTransform(
    tf1=transforms.outcome.Log(),
    tf2=transforms.outcome.Standardize(m=1),
)

model = SingleTaskGP(train_X, train_Y,
    input_transform=input_transform,
    outcome_transform=outcome_transform, 
)

However, during my optimization run, I will regularly get warnings in each iteration like the following:

WARNING:py.warnings:InputDataWarning: Data (outcome observations) is not standardized (std = tensor([31.5549], dtype=torch.float64), mean = tensor([-1.2118], dtype=torch.float64)).Please consider scaling the input to zero mean and unit variance.
 C:\Users\username\AppData\Roaming\Python\Python310\site-packages\botorch\models\utils\assorted.py: 267

Am I chaining the outcome transforms incorrectly? The warning does not give a full stack trace so it is difficult for me to troubleshoot. I do not get any errors when using Standardize alone (without ChainedOutcomeTransform) or when just initializing the model.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions