Skip to contents

The ArchiveAsync stores all evaluated points and performance scores in a rush::Rush data base.

S3 Methods

  • as.data.table(archive)
    ArchiveAsync -> data.table::data.table()
    Returns a tabular view of all performed function calls of the Objective. The x_domain column is unnested to separate columns.

Super class

bbotk::Archive -> ArchiveAsync

Public fields

rush

(Rush)
Rush controller for parallel optimization.

Active bindings

data

(data.table::data.table)
Data table with all finished points.

queued_data

(data.table::data.table)
Data table with all queued points.

running_data

(data.table::data.table)
Data table with all running points.

finished_data

(data.table::data.table)
Data table with all finished points.

failed_data

(data.table::data.table)
Data table with all failed points.

n_queued

(integer(1))
Number of queued points.

n_running

(integer(1))
Number of running points.

n_finished

(integer(1))
Number of finished points.

n_failed

(integer(1))
Number of failed points.

n_evals

(integer(1))
Number of evaluations stored in the archive.

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

ArchiveAsync$new(search_space, codomain, check_values = FALSE, rush)

Arguments

search_space

(paradox::ParamSet)
Specifies the search space for the Optimizer. The paradox::ParamSet describes either a subset of the domain of the Objective or it describes a set of parameters together with a trafo function that transforms values from the search space to values of the domain. Depending on the context, this value defaults to the domain of the objective.

codomain

(paradox::ParamSet)
Specifies codomain of function. Most importantly the tags of each output "Parameter" define whether it should be minimized or maximized. The default is to minimize each component.

check_values

(logical(1))
Should points before the evaluation and the results be checked for validity?

rush

(Rush)
If a rush instance is supplied, the tuning runs without batches.


Method push_points()

Push queued points to the archive.

Usage

ArchiveAsync$push_points(xss)

Arguments

xss

(list of named list())
List of named lists of point values.


Method pop_point()

Pop a point from the queue.

Usage

ArchiveAsync$pop_point()


Method push_running_point()

Push running point to the archive.

Usage

ArchiveAsync$push_running_point(xs, extra = NULL)

Arguments

xs

(named list)
Named list of point values.

extra

(list())
Named list of additional information.


Method push_result()

Push result to the archive.

Usage

ArchiveAsync$push_result(key, ys, x_domain, extra = NULL)

Arguments

key

(character())
Key of the point.

ys

(list())
Named list of results.

x_domain

(list())
Named list of transformed point values.

extra

(list())
Named list of additional information.


Method push_failed_point()

Push failed point to the archive.

Usage

ArchiveAsync$push_failed_point(key, message)

Arguments

key

(character())
Key of the point.

message

(character())
Error message.


Method data_with_state()

Fetch points with a specific state.

Usage

ArchiveAsync$data_with_state(
  fields = c("xs", "ys", "xs_extra", "worker_extra", "ys_extra", "condition"),
  states = c("queued", "running", "finished", "failed"),
  reset_cache = FALSE
)

Arguments

fields

(character())
Fields to fetch. Defaults to c("xs", "ys", "xs_extra", "worker_extra", "ys_extra").

states

(character())
States of the tasks to be fetched. Defaults to c("queued", "running", "finished", "failed").

reset_cache

(logical(1))
Whether to reset the cache of the finished points.


Method best()

Returns the best scoring evaluation(s). For single-crit optimization, the solution that minimizes / maximizes the objective function. For multi-crit optimization, the Pareto set / front.

Usage

ArchiveAsync$best(n_select = 1, ties_method = "first")

Arguments

n_select

(integer(1L))
Amount of points to select. Ignored for multi-crit optimization.

ties_method

(character(1L))
Method to break ties when multiple points have the same score. Either "first" (default) or "random". Ignored for multi-crit optimization. If n_select > 1L, the tie method is ignored and the first point is returned.


Method nds_selection()

Calculate best points w.r.t. non dominated sorting with hypervolume contribution.

Usage

ArchiveAsync$nds_selection(n_select = 1, ref_point = NULL)

Arguments

n_select

(integer(1L))
Amount of points to select.

ref_point

(numeric())
Reference point for hypervolume.


Method clear()

Clear all evaluation results from archive.

Usage

ArchiveAsync$clear()