Skip to content

[Feature Request] Specifying fixed features to AxClient.get_next_trial (to conduct contextual BO using Service API) #746

@MattiaVerticchio

Description

@MattiaVerticchio

Hi everyone. First of all, thanks for working on Ax! 😁

I have a setting where I’d like to optimize a function based on a certain context. The context is, in this case, the day of the week.

If I understood correctly, the only way to have contextual BO in Ax is by using the Developer API; setting the context as input covariates, and then generating a new_trial with fixed_features:

gpei = Models.BOTORCH(
    experiment=exp,
    data=exp.fetch_data()
)

generator_run = gpei.gen(n=1)

fixed_features = ObservationFeatures(parameters={"day_of_week": 0})

trial = exp.new_trial(
    generator_run=generator_run,
    fixed_features=fixed_features)
)

For this kind of task, the Developer API is more flexible but adds a lot of complexity. Is there any other way to do contextual BO, or pass fixed_features when using the simpler Service API?

Thanks!

Metadata

Metadata

Labels

enhancementNew feature or requestwishlistLong-term wishlist feature requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions