Update PINNInterface Inheritance#542
Conversation
Code Coverage SummaryResults for commit: 64bf7bd Minimum allowed coverage is ♻️ This comment has been updated with latest results |
GiovanniCanali
left a comment
There was a problem hiding this comment.
Hi @dario-coscia,
I am not comfortable with PINNInterface inheriting from SupervisedSolverInterface, as I find it conceptually misleading: PINNs can be entirely "unsupervised". On the other hand, your implementation seems to be logically sound and streamlines the code, even if the reduction is relatively modest (~50 lines).
I would suggest waiting for additional opinions from others on this point.
As for the changes related to InverseProblem, I have no objections. It would be nice to do the same thing for Multi solvers, but I reckon it might be a bit trickier.
I see your point, and that's also a concern that I share. Inheriting from SupervisedSolver is done in order to have less lines of code (and don't repeat loss_data method). In my opinion, every method present in Supervised solver interface should be inherited by pinn as they can also work in a supervised manner. The problem is more the fact that loss_data is abstract, which means that the user must implement it if inheriting from pinn interface A possible solution would be to overload loss_data in pinn interface and make it not abstract (so it is up to the user if the method must be defined). What do you think? |
|
@FilippoOlivo what do you think? |
|
Hi @dario-coscia @GiovanniCanali, |
We can think to add |
I am sorry, but I am not sure I have fully understood what you mean: are you still planning to let |
Currently, When inheriting from |
|
Agre
Fine for me! |
3690c53 to
9916ead
Compare
|
Thank you @GiovanniCanali and @FilippoOlivo, for the nice discussion. Unfortunately, the |
9b0b3b7 to
64bf7bd
Compare
|
@FilippoOlivo is now ok for you? Can we merge? |
I propose these two changes:
add_param_groupofInverseProblemparameters fromPINNInterfacetoSingleSolverInterfacesince also supervised single solver could in principle solve inverse problems. For multisolver, it is not clear which optimizer needs the parameter to be attached (case specific)PINNInterfaceshould inherit fromSupervisedSolverInterfaceto avoid code duplication