meom-group / eophis

Couple Python and Machine Learning models with Geophysical simulation codes through OASIS
https://eophis.readthedocs.io/en/latest/
MIT License
9 stars 1 forks source link

Router as an object #35

Open alexis-barge opened 1 month ago

alexis-barge commented 1 month ago

Router is currently a function exported inside Loop. Router could be an object that takes inputs variables names, output variables names, and a Model (function) that links them. This way, it is possible to check inside Eophis if returned outputs should be None or Model results.

The idea is to get rid of Model architecture that requires to send back None if at least one None in the inputs.

This requires to find a way to easily transfer several Routers to Loop.

This modifies the API and implies documentation updates.