fix mlr3 integration, add light rcmdcheck and fix its complaints#29
Merged
Conversation
mmyrte
commented
May 6, 2026
| on = "id_trans" | ||
| ] | ||
|
|
||
| # TODO put in validator that the learner has predict_type = "prob" set |
Member
Author
There was a problem hiding this comment.
@copilot fix this, but instead of erroring out straight away, i want both fit_partial_models and fit_full_models to coerce the learner to mlr3's predict_type "prob"; if that fails, then we should error out. we should also verify at this point that the learner supports twoclass classifications.
Contributor
There was a problem hiding this comment.
Done in 552ceac. Added a coerce_learner_for_classif() internal helper that is called at the top of both fit_partial_models and fit_full_models (direct-learner branch). It:
- Checks the learner is an mlr3
Learner/AutoTuner(errors if not). - Checks
"twoclass" %in% learner$properties(errors if not). - Coerces
predict_typeto"prob"if it isn't already — wrapping the assignment intryCatchso that learners which don't support probabilistic output get a descriptive error instead of mlr3's raw param-set message.
Tests added: auto-coercion from "response" to "prob" (verifying the side-effect on the passed-in R6 object), and an error when twoclass support is absent.
Agent-Logs-Url: https://github.com/ethzplus/evoland-plus/sessions/5b22b07c-415d-4ace-8427-bb48fe16b121 Co-authored-by: mmyrte <24587121+mmyrte@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
if two models have the same score, but only one model has been trained, we get strange errors. this avoids it, but ideally the error should already crop up in fit_full_models
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There were issues I had not thought of in #24