Change in the driver output type #252
gilrrei
announced in
Announcements
Replies: 0 comments
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.
-
Change in driver run return type
With #241, we changed the output type of the driver from a tuple expecting
result, gradientto a dictionary{"result": result, "gradient":gradient}Does it affect me?
If you don't use data processors, so you don't extract data from your simulation results, you don't need to change anything. 🙏
If you have a custom driver (with a dataprocessor), i.e., not
Jobscript,MpiorFourc, maybe yes. Otherwise, everything still works :)What do I have to change in my custom driver?
If your the
_get_resultsmethod of your driver returns the tupleresult, gradientchange it to{"result": result, "gradient":gradient}(You can omit the gradient if it'sNone). If you avoid this function altogether, do this change in therunmethod of your custom driver.Why the change?
tl;dr move towards general data passing without the need for change base classes etc.
gradientif no gradient is requireddisplacementsandstresses,hessian,simulation_times, etc. Since most iterators expect the result keysresultand maybegradient, only these are used. The goal is that this additional data is also written into the metadata file of each job (not the case yet)Beta Was this translation helpful? Give feedback.
All reactions