Support for default input transfroms in MBM #3102
Open
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.
Summary:
Input normalization is important to get the best performance out of the BoTorch models we use. The current setup relies on either using
UnitX
transform from Ax, or manually addingNormalize
toModelConfig.input_transform_classes
to achieve input normalization.UnitX
is not ideal since it only applies to float valuedRangeParameters
. If we make everything into floats to useUnitX
, we're locked into using continuous relaxation for acquisition optimization, which is something we want to move away from.Normalize
works well, particularly whenbounds
argument is provided (It's applied at each pass through the model, rather than once to the training data, but that's a separate discussion). However, requiring it as an explicit user input is a bit cumbersome.This diff adds the machinery for constructing a default set of input transforms. This implementation retains the previous
InputPerturbation
transform for robust optimization, and addsNormalize
transform if the non-task features of the search space are not normalized.With this change, we should be able to remove
UnitX
transform from an MBM model(spec) without losing input normalization.Other considerations:
input_transform_classes
argument is left asDEFAULT
. If the user suppliesinput_transform_classes
or sets it toNone
, no defaults will be used. Would we want to add defaults even when the user supplies some transforms? If so, how would we decide whether to append or prepend the defaults?Normalize
at each pass through the model is not super efficient. A vectorized application of an Ax transform should generally be more efficient. A longer term alternative would be to expand Ax-sideUnitX
to support more general parameter classes and types, without losing information in the process. This would require additional changes such as support for non-integer valued discreteRangeParameters
, and support for non-integer discrete values in the mixed optimizer.Differential Revision: D65622788