Skip to contents

Base class for objects that unifies configuration of state. ConfigurableComponent-objects should always have active bindings that reflect the arguments given to their constructor. They also have a $param_set field containing a paradox::ParamSet, which are used for more fine-grained configuration of the object. Things that somehow determine how an object can be used (e.g. what kinds of things it is compatible with), particularly things that can not be changed after constructions should likely be construction arguments; others should likely be in $param_set.

Initialize a ConfigurableComponent.

Helper for print outputs.

Printer.

Set parameter values and fields in one step.

Arguments

id

(character(1) | NULL)
Identifier of the object. If left as NULL, the object does not get an ID.

param_set

(paradox::ParamSet | NULL)
Set of hyperparameters / configuration parameters.

label

(character(1))
Label for the object.

man

(character(1))
String in the format [pkg]::[topic] pointing to a manual page.

packages

(character())
Package names required by the object.

additional_configuration

(character())
Additional configuration settings. Anything passed here must be a field or active binding of the object that is not passed as an initialization argument to the (top-level) constructor.

additional_phash_input

(character())
Names of fields (in self or private) whose values should influence the persistent hash (phash). Useful for subclasses that expose additional configuration state outside of constructor arguments or the parameter set. Note that entries of additional_configuration are not automatically included (as they may be expensive to compute). additional_phash_input should reference the data from which additional_configuration fields are computed.

...

(named any)
Configuration values to set.

.values

(named list())
Alternative way to pass configuration values.

Details

The state of the object should be completely determined by:

  • arguments passed for initialization, all of which must be accessible as fields or active bindings of the object.

  • param_set configuration parameteres

  • additional fields / active bindings, which must be listed as additional_configuration.

  • there may be other active bindings, but these should not convey any relevant state.

Fields

id

(character(1)) Identifier of the object. Used in tables, plot and text output.

label

(character(1)) Label for this object.

man

(character(1)) String in the format [pkg]::[topic] pointing to a manual page.

packages

(character()) Required packages.

param_set

(paradox::ParamSet | NULL) Set of hyperparameters.

hash

(character(1)) Stable hash that includes the parameter values (if present) and everything covered by phash, but not state.

phash

(character(1)) Hash that includes id, class, label, man, packages, and the fields named in the additional_phash_input construction argument, but not parameter values and no state.