alan-turing-institute / autoemulate

emulate simulations easily
MIT License
15 stars 1 forks source link

Including multiple PyTorch models in `compare()` #190

Open mastoffel opened 4 months ago

mastoffel commented 4 months ago

In the MODEL_REGISTRY under autoemulate.emulators.__init__py, we are adding models like this:

MODEL_REGISTRY = {
 "GaussianProcessSk": GaussianProcessSk(),
 "SupportVectorMachines": SupportVectorMachines(),
"NeuralNetTorch": NeuralNetTorch(module="mlp")
}

A second neural network would be added like this:

MODEL_REGISTRY = {
 "GaussianProcessSk": GaussianProcessSk(),
 "SupportVectorMachines": SupportVectorMachines(),
"NeuralNetTorch": NeuralNetTorch(module="mlp")
"NeuralNetTorch": NeuralNetTorch(module="rbf")
}

Which currently fails. The reason is that there are a range of checks which use get_model_name(), a function that accesses the class name. So that function needs to be changed and different PyTorch networks renamed in the MODEL_REGISTRY. This means that a few methods/functions will likely need an additional input which is a dict mapping model names. See also #175

bryanlimy commented 3 months ago

This is solved in https://github.com/alan-turing-institute/autoemulate/pull/196 ?