Tabfm auto.
Tabfm predicts in context, so every prediction runs the backbone over the training rows once per estimator.
This is too slow to be useful on the CPU, so the auto is registered for "cuda" only and
Auto$check() removes it from the search space whenever devices does not include "cuda".
Construct it with AutoTabFM$new(devices = c("cpu", "cuda")) and re-register it in mlr_auto to run it
on the CPU anyway.
Value
Object of class R6::R6Class and AutoTabFM.
Python learners
Python learners like TabPFN, TabFM, and fastai run via reticulate and
therefore need a Python installation with their required packages.
There are two ways to provide it:
Do nothing and let
reticulate::py_require()install the required packages into an ephemeral virtual environment automatically.Point the
RETICULATE_PYTHONenvironment variable to a Python installation that has the required packages installed.
We recommend option 2 when running on many workers,
as it avoids the overhead of downloading and installing the packages on each worker.
Use install_python_learners() to create a conda environment with the required packages and set
RETICULATE_PYTHON to the returned Python binary.
The TabPFN learner additionally requires the TABPFN_TOKEN environment variable to download the model weights.
Super class
Auto -> AutoTabFM
Methods
Inherited methods
AutoTabFM$new()
Creates a new instance of this R6 class.
Usage
AutoTabFM$new(id = "tabfm", devices = "cuda")Arguments
id(
character(1))
Identifier for the new instance.devices(
character())
Devices the auto is allowed to run on. Defaults to"cuda"only, because tabfm is too slow to be useful on the CPU.
AutoTabFM$check()
Check if the auto is compatible with the task.
Arguments
task(mlr3::Task).
memory_limit(
integer(1)).large_data_set(
logical(1)).devices(
character())
Devices to use. Allowed values are"cpu"and"cuda". Default is "cpu".
AutoTabFM$graph()
Create the graph for the auto.
Arguments
task(mlr3::Task).
measuren_threads(
integer(1)).timeout(
integer(1)).devices(
character())
Devices to use. Allowed values are"cpu"and"cuda". Default is "cpu".
AutoTabFM$estimate_memory()
Estimate the memory for the auto.
Arguments
task(mlr3::Task).
devices(
character())
Devices to use. Allowed values are"cpu"and"cuda". Default is "cpu".
Examples
auto("tabfm")
#> <AutoTabFM>
#> Inherits from: <Auto>
#> Public:
#> check: function (task, memory_limit = Inf, large_data_set = FALSE, devices = "cpu")
#> clone: function (deep = FALSE)
#> design_default: function (task)
#> design_set: function (task, measure, size)
#> devices: cuda
#> early_stopping_rounds: function (task, budget = Inf)
#> estimate_memory: function (task, devices = "cpu")
#> finalize_model: function (graph_learner)
#> graph: function (task, measure, n_threads, timeout, devices, isolate_python = TRUE)
#> id: tabfm
#> initialize: function (id = "tabfm", devices = "cuda")
#> n_cpu: 1
#> n_gpu: 1
#> packages: mlr3 mlr3extralearners callr
#> properties:
#> search_space: function (task)
#> task_types: classif regr
#> Private:
#> .default_values: list
#> .search_space: ParamSet, R6
