General interface for Background & Perturbation Emulators? #345
arthurmloureiro
started this conversation in
Ideas
Replies: 1 comment 4 replies
|
While reviewing @ivansladoljev’s PR, I’ve been giving this some thought. I think the idea is excellent, but it may extend beyond the intended scope of cloelib itself. The challenge is that these emulators are not the only ones we foresee interfacing with cloelib. I’m wondering whether this Protocol/Interface/Class structure might make more sense as a standalone component — effectively a dedicated emulator API — while keeping the cloelib Perturbation protocol as the common interface for all possible codes. I’d be very happy to support @ivansladoljev in making this happen! |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @cloe-org/cloe-maintainers !
I have been discussing with @ivansladoljev, @alessiospuriomancini and @marcobonici if it is possible to create a generic interface/api (maybe a protocol?) for emulators in
cloelib.This would avoid us having to code new interfaces for each new emulator that we want to add to
cloelib. @ivansladoljev 's PR (#255) is a step towards that but I still think we could bash our heads together to find a solution that is agnostic of:I do not have enough experience with creating emulators to know if this is even possible, but I imagine so.
We could have a generic interface that reads a
yamlfile containing paths to weights/architectures and dictionary of ranges and the same API to return the backgrounds and perturbations. Does that make sense?Something like:
then the interface is instantiated with something like (just a brainstorming):
This way we can generically support any emulator with a single interface instead of coding new interfaces for each new emulator.
All reactions