mlr-org / mlr3

mlr3: Machine Learning in R - next generation
https://mlr3.mlr-org.com
GNU Lesser General Public License v3.0
906 stars 84 forks source link

feat(Learner): Allow for additional input checks on task #996

Closed sebffischer closed 1 month ago

sebffischer commented 5 months ago

By adding this feature, it is possible for learner's to perform custom compatibility checks. This is e.g. needed in torch, where we have a "tensor column", where the tensor can have different shapes. To verify that the tensor shapes fits together with the neural network, we want to perform input checks before calling into train, as incompatability is a user error and should not trigger the fallback learner

sebffischer commented 2 months ago

We can alternatively allow for something like this, by introducing a error condition such as NoFallback that is then handled by learner_train()