Skip to contents

Fastai auto.

Value

Object of class R6::R6Class and AutoFastai.

Python learners

Python learners like TabPFN and fastai run via reticulate and therefore need a Python installation with their required packages. There are two ways to provide it:

  1. Do nothing and let reticulate::py_require() install the required packages into an ephemeral virtual environment automatically.

  2. Point the RETICULATE_PYTHON environment 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 -> AutoFastai

Methods

Inherited methods


AutoFastai$new()

Creates a new instance of this R6 class.

Usage

AutoFastai$new(id = "fastai")

Arguments

id

(character(1))
Identifier for the new instance.


AutoFastai$check()

Check if the auto is compatible with the task.

Usage

AutoFastai$check(
  task,
  memory_limit = Inf,
  large_data_set = FALSE,
  devices = "cpu"
)

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".


AutoFastai$graph()

Create the graph for the auto.

Usage

AutoFastai$graph(task, measure, n_threads, timeout, devices)

Arguments

task

(mlr3::Task).

measure

(mlr3::Measure).

n_threads

(integer(1)).

timeout

(integer(1)).

devices

(character())
Devices to use. Allowed values are "cpu" and "cuda". Default is "cpu".


AutoFastai$estimate_memory()

Estimate the memory for the auto.

Usage

AutoFastai$estimate_memory(task)

Arguments

task

(mlr3::Task).


AutoFastai$internal_measure()

Get the internal measure for the auto.

Usage

AutoFastai$internal_measure(measure, task)

Arguments

measure

(mlr3::Measure).

task

(mlr3::Task).


AutoFastai$clone()

The objects of this class are cloneable with this method.

Usage

AutoFastai$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

auto("fastai")
#> <AutoFastai>
#>   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: cpu cuda
#>     early_stopping_rounds: function (task, budget = Inf) 
#>     estimate_memory: function (task) 
#>     finalize_model: function (graph_learner) 
#>     graph: function (task, measure, n_threads, timeout, devices) 
#>     id: fastai
#>     initialize: function (id = "fastai") 
#>     internal_measure: function (measure, task) 
#>     packages: mlr3 mlr3extralearners callr
#>     properties: internal_tuning
#>     search_space: function (task) 
#>     task_types: classif
#>   Private:
#>     .default_values: list
#>     .search_space: ParamSet, R6