Detect Objectives with Native data.table Evaluation Semantics
Source:R/utils_objective.R
objective_uses_dt_eval.RdReturns whether an objective explicitly advertises that its eval_dt()
implementation preserves the missing-value semantics expected by
SearchInstance.
Arguments
- objective
(bbotk::Objective)
Objective to inspect.
Details
This is an explicit S3 capability instead of a method-body heuristic.
Merely overriding eval_dt() is not sufficient: subclasses can wrap or
forward to bbotk::Objective's default eval_dt(), which still converts
rows with transpose_list() and therefore treats dependency-inactive
parameters as literal NA values instead of dropping them. Native
data-table objectives opt in with an S3 method, and subclasses inherit that
capability automatically.