Closed missuse closed 4 years ago
As a quick solution you could use a fallback learner in order to avoid NaN/NAs in the OptimInstance$archive
. See the section on fallback learners here: https://mlr3book.mlr-org.com/error-handling.html
Apart from that this is definitely a bug. Generally we should test against objectives that return NAs or decide how to deal with them.
We decided that objectives that return NAs throw an error.
Perhaps it would be worth considering giving the option of na.rm = TRUE
with terminator stagnation while the default behavior would be an error.
Perhaps it would be worth considering giving the option of
na.rm = TRUE
with terminator stagnation while the default behavior would be an error.
no, you misunderstand. bbotk from now on DISALLOWS completely that NAs are returned in the evaluation. you get an error if that happens. and tuning will stop, hard. but the good news is: simply use the fallback learner in mlr3. that's mlr3's canonical answer to that problem. that ENSURE that you always generate a non-NA performance value. that allows us to keep concepts and API simple, as here.
Perhaps it would be worth considering giving the option of
na.rm = TRUE
with terminator stagnation while the default behavior would be an error.no, you misunderstand. bbotk from now on DISALLOWS completely that NAs are returned in the evaluation. you get an error if that happens. and tuning will stop, hard. but the good news is: simply use the fallback learner in mlr3. that's mlr3's canonical answer to that problem. that ENSURE that you always generate a non-NA performance value. that allows us to keep concepts and API simple, as here.
What is the point of encapsulation then?
Anyhow thanks for the explanation I already started using fallback learners a while ago.
Hi,
I stumbled on this by chance, not sure if it can be classified as bug but I thought you should know about it.
When combined with a learner that fails occasionally stagnation terminator returns the error:
Example:
After 6 configurations evaluated the error occurs - I trust it is due to the
NaN
in the performance measureAll the best,
Milan