pytorch / botorch

Bayesian optimization in PyTorch
https://botorch.org/
MIT License
3.11k stars 406 forks source link

[Feature Request] Allow negative indices to fixed_features in optimizers #2605

Open esantorella opened 4 weeks ago

esantorella commented 4 weeks ago

🚀 Feature Request

Allow negative indices to fixed_features and fixed_features_list in optimizers such as optimize_acqf

Motivation

This came up in #2602. It is tempting to describe the index of a feature with an index like "-1", but this is not currently supported.

Pitch

This should be easy to do by changing the indices to index % num_features.

Are you willing to open a pull request? (See CONTRIBUTING)

Only if users want this! Speak up if this would be useful for you (or would have spared your past self some hassle).