Open Abrikosoff opened 2 months ago
Hi @Abrikosoff, Fixed parameters are typically removed via the RemoveFixed transform since they aren't needed for modeling/generating candidates. The easiest thing to do would be to add the fixed parameter to the input of in the non-linear constraint callable when you define it (knowing that it won't be passed in).
Alternatively, you could remove the RemoveFixed transform and include the fixed parameter in the model/model's search space. The default transforms are Cont_X_trans + Y_trans
(1, 2) and you can set the transforms by passing a list to the model_kwargs on the GenerationStep
Hi Ax Team,
I've been trying to implement a 'local' NChooseK constraint, where one has the choice of imposing the constraint on any segment of the suggestions (e.g., x1-x6, and I want 2Choose1 on x1,x2). The code below is a runnable repro:
Now I have noticed that if I have a fixed parameter in my search space (as commented out above), then I get an error:
ValueError: batch_initial_conditions.shape[-1] must be 5. The shape is torch.Size([5, 1, 6]).
I looked under the hood, and apparently it seems that the last dimension of thebounds
tensor needs to match the last dims ofbatch_initial_conditions
. But if there is a fixed parameter in there, apparently this doesn't contribute to the bounds? Is this meant to be like this, and if yes, is there a workaround?