g3_fit: Always return a parameter table, regardless of model type#45
g3_fit: Always return a parameter table, regardless of model type#45willbutler42 merged 2 commits intomainfrom
Conversation
Both gadgetplots & g3_fit_inner() assume the parameters are in table format, not list. But depending which path the model goes through g3_fit(), it may return a list. Add tests to ensure we always send a data.frame downstream.
|
I'll let you merge this...The output of These attributes seem to have disappeared in the version I used. Not sure whether they'll reappear after merging this pull request. |
It's a related problem. Looks like summary is added by g3_optim, but g3_fit may rebuild your model / parameter table, in which case they get lost. They should be fixed by this (admittedly as an unintended side-effect) as the returned parameter table isn't recreated any more. I'll give it a try & see. |
This also fixed this problem, but make sure it stays that way.
|
@willbutler42 any objections to this? In retrospect banning |
|
No objections! |
Both gadgetplots & g3_fit_inner() assume the parameters are in table format, not list. But depending which path the model goes through g3_fit(), it may return a list.
Add tests to ensure we always send a data.frame downstream. Note that the R model is fine with a data.frame params now, and once I'm feeling brave enough will switch it's parameter template to be a table, removing the old list template entirely.
report_detailis also a historical artifact that needs tidying up, but one thing at a time. It defaults to 1 anyway, and we automatically turn reporting off when optimising. But it's also being a flag to show thatg3a_report_detail()has been added to the model, which isn't easy to check otherwise.