Skip to content
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

Supplementing error message #371

Open
harriscw opened this issue Sep 27, 2022 · 3 comments
Open

Supplementing error message #371

harriscw opened this issue Sep 27, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@harriscw
Copy link

harriscw commented Sep 27, 2022

rbmi/R/draws.R

Line 362 in 0e06da6

msg <- "MMRM failed to fit to the data after removing subject '%s'"

Possible to also output the verbatim error (or option to do so)?
e.g. "L-BFGS-B needs finite values of 'fn'"

@gowerc
Copy link
Collaborator

gowerc commented Oct 4, 2022

Maybe?

Issue is that there isn't a single failure but multiple, as in we try the optimiser I think 3 times with different starting points and configurations and only declare it a failure if all of them have failed, in which case which error message do we return as they may have failed differently....

Could return all of them but that means we may need to rework the functions a little bit to pass the failure state/message down each iteration

@harriscw
Copy link
Author

harriscw commented Oct 4, 2022

Alternatively maybe just adding more info to the error message? e.g. something like MMRM failed to fit to the data via glmmTMB attempting with three optimizers when removing subject '%s'

Just a suggestion. Spent some time digging through the code trying to figure out the source of this error, am thinking maybe something like this would help avoid that?

@gowerc gowerc added the enhancement New feature or request label Jan 30, 2023
@gowerc
Copy link
Collaborator

gowerc commented Sep 21, 2023

Hmm, I am now wondering, instead of passing back the failure messages if we can use invokeRestart or some equivalent to get the function to dump the environment contents upon failure. E.g. dump the current dataset version and mmrm call to Rds so that users can then play around with it to see what happened?

@gowerc gowerc modified the milestone: v1.3.0 Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants