[WIP] Refactor allFit to avoid update() in optimizer refits#13
Conversation
|
@copilot could you please try again? |
Co-authored-by: annahuynhly <97189987+annahuynhly@users.noreply.github.com> Agent-Logs-Url: https://github.com/annahuynhly/lme4/sessions/30bb2320-1032-4bfe-83c2-4a0189123f9c
Co-authored-by: annahuynhly <97189987+annahuynhly@users.noreply.github.com> Agent-Logs-Url: https://github.com/annahuynhly/lme4/sessions/30bb2320-1032-4bfe-83c2-4a0189123f9c
Implemented a new attempt and pushed it in |
annahuynhly
left a comment
There was a problem hiding this comment.
@copilot please really focus on this key comment:
It would be faster and more robust to only re-do the optimize(Gl|L)mer + mkMermod part of the pipeline ... More generally, update() could be optimized to be smarter about which components are being changed and only re-running the necessary bits:
| assign("pars", start, envir = tmp_env, inherits = FALSE) | ||
| } | ||
| on.exit({ environment(form) <- env }, add = TRUE) | ||
| if (is.null(start)) { |
There was a problem hiding this comment.
@copilot don't you think that it's ironic you used update here, but the main point is to NOT use update...?
There was a problem hiding this comment.
Addressed in b0e5dae (plus e950e49): I removed the remaining update() usage from allFit() and switched the refit path to refit(object, control=ctrl) for optimizer runs. No UI changes here, so there is no UI screenshot.
Co-authored-by: annahuynhly <97189987+annahuynhly@users.noreply.github.com> Agent-Logs-Url: https://github.com/annahuynhly/lme4/sessions/895f4c08-9385-4848-bffd-3b521aaec1cb
Co-authored-by: annahuynhly <97189987+annahuynhly@users.noreply.github.com> Agent-Logs-Url: https://github.com/annahuynhly/lme4/sessions/895f4c08-9385-4848-bffd-3b521aaec1cb
Done in |
This PR refactors
allFit()to avoidupdate()in the optimizer refit loop and rely on the more directrefit()path instead.Changes made
R/allFit.RsoallFit()now refits each optimizer run viarefit(object, control=ctrl)rather thanupdate(...).update()fallback from the allFit refit path.optCtrl,maxfun, optimizer-specific method/algorithm wiring).start_from_mle && isNLMM(object).tests/testthat/test-allFit.Rto validate robustness without relying onupdate()-stylecall$datalookup.Validation
test-allFit, but this environment does not provideR/Rscript, so runtime tests could not be executed locally.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.