Conversation
|
Thanks @KislayaRavi, I think we should have a discussion (including @bertiqwerty and @LukasHebing ) on how to handle this. I am bit hesitant to merge it in due to the kind of dependency hell with the pfn4bo package (https://github.com/experimental-design/bofire/pull/731/changes#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R55). Maybe we should also add a bofire community directory (in analogy to botorch comunity) to handle this kind of stuff. From an architectural perspecitive, we would need to have an easy way of registering new data models and its functional equivalents, then people could easily put their custom models in without the need of changing the codebase. What do you think? Best, Johannes |
|
I totally agree with having a separate |
I like the idea of simplifying additional content (surrogates, objectives, etc.) with data-models without having to add them in 5 different bofire files. The architecture with data-model objects and "real" objects makes this difficult. A nice solution would be an abstract data-model for e.g. surrogates, which has also all abstract methods (including torch-callables, If we have that in bofire, custom other content can be added way more easy. |
|
Hi all, thanks @KislayaRavi. I agree with @jduerholt that we should not merge this PR into BoFire due to the depedencies. Especially that only Python older 3.12 is allowed is a clear deal breaker. Already some time ago I thought it could be helpful to have BoFire "extendible from the outside". Currently even if one would not want to use any mappers Pydantic would scream at you if you pass a datamodel of a surrogate that is not part of the corresponding union (e.g., @LukasHebing, your proposal I did not understand. Maybe something to discuss in person or in a call? |
|
I agree with you all, from my perspective we need a This method should then be exposed on the high level api, and can be used by people to add new surrogates, strategies, priors etc. without the need to modify the code. What do you think? Under the hood the method would register the data model and its functional equivalent in the example of a surrogate at this place: bofire/bofire/surrogates/mapper.py Line 100 in 55fff4a What do you think? I agree, a call for this could be helpful, who wants to join? |
|
If you schedule a call for any time next week, I will join :) Some quick thoughts:
|
|
Hello everyone, |
Motivation
Adding PFN surrogates to BoFire.
Closing Issue #655
I used the
botorch_communityversion of PFN as mentioned in the aforementioned issue.(Write your motivation here.)
Have you read the Contributing Guidelines on pull requests?
Yes
Have you updated
CHANGELOG.md?Yes
Test Plan
test_pfn.pywhich test the PFN Surrogates.Some important things to note:
botorch_communitydoes not applyoutcome_transformautomatically. So, I needed to add it explicitly in the_predictfunction ofPFNSurrogates. This also requires overriding_loadand_dumpfunctions forPFNsurrogate.TabPFNmodels cannot be used. It requires more work to add them (also some license issues). I have one eye onTabICLtoo. Its implementation is sometime further down the line (hopefully).