Skip to content

ic_generator seems undocumented (for non-linear inequality constraints) #1572

@matthewcarbone

Description

@matthewcarbone

🐛 Bug

I am trying to use a non-linear inequality constraint with my Bayesian Optimization procedure. As a test, I'm simply starting with

$$ x_2 - |x_1| \geq 0. $$

Written as a constraint, this is just (I think):

def constraint(x):
    return x[..., 1] - torch.abs(x[..., 0]) >= 0.0

However, when I try to do this using optimize_acqf, I get a RuntimeError:

RuntimeError: `ic_generator` must be given if there are non-linear inequality constraints.

I am not looking to reproduce anything specifically, but there is no documentation about what this ic_generator actually is. A google search of "ic_generator" botorch reveals two results, and both are from source code. It is not obvious how to use this feature.

To reproduce

Simply use any call to optimize_acqf with the constraint above and without providing the ic_generator keyword argument.

Expected Behavior

Unclear, it would be nice to have some details about how to provide a sensible ic_generator object so I can use this feature!

System information

botorch version 0.7.2
gpytorch version 1.9.0
torch version 1.12.0
System info: MacOS Ventura 13.0.1

Additional context

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions