Closed slishak-PX closed 3 weeks ago
Thanks for reporting. I put in #2603 to update docstrings to clarify that negative indices are not allowed and raise an exception if they are provided.
I feel like it shouldn't be to hard to allow this by canonicalizing the indices to index % num_features
? Maybe we can make a backlog task for this?
To keep things organized, I opened #2605 for that feature request. It would be a good task for a newcomer.
🐛 Bug
If
fixed_features
has a negative index, the initial conditions will not be constructed with the correct reduced dimensionality.To reproduce
Code snippet to reproduce
Stack trace/error message
Expected Behavior
The negative indices should be equivalent to specifying the last dimension, or the docs should make it clear that this is not allowed.
System information
Please complete the following information:
Additional context
This line is one reason why it doesn't work - I don't know yet if there are other areas where the indices are assumed positive.
https://github.com/pytorch/botorch/blob/66660e341b7dd0780feac4640f3709a8fd024206/botorch/generation/utils.py#L164