-
Notifications
You must be signed in to change notification settings - Fork 79
Update PINNInterface Inheritance #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Code Coverage Summary
Results for commit: 64bf7bd Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_group
ofInverseProblem
parameters fromPINNInterface
toSingleSolverInterface
since 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)PINNInterface
should inherit fromSupervisedSolverInterface
to avoid code duplication