Skip to contents

Write to TOML file

Usage

write_toml(x, file, overwrite = FALSE, verbosity = 1L)

write_toml.SuperConfig(x, file, overwrite = FALSE, verbosity = 1L)

Arguments

x

SuperConfig object.

file

Character: Path to output TOML file.

overwrite

Logical: If TRUE, overwrite existing file.

verbosity

Integer: Verbosity level.

Value

SuperConfig object, invisibly.

Author

EDG

Examples

x <- setup_SuperConfig(
  dat_training_path = "~/Data/iris.csv",
  dat_validation_path = NULL,
  dat_test_path = NULL,
  weights = NULL,
  preprocessor_config = setup_Preprocessor(remove_duplicates = TRUE),
  algorithm = "LightRF",
  hyperparameters = setup_LightRF(),
  tuner_config = setup_GridSearch(),
  outer_resampling_config = setup_Resampler(),
  execution_config = setup_ExecutionConfig(),
  question = "Can we tell iris species apart given their measurements?",
  outdir = "models/",
  verbosity = 1L
)
tmpdir <- tempdir()
write_toml(x, file.path(tmpdir, "rtemis.toml"))
#> 2026-02-22 18:59:43 
#>  Created file: /var/folders/rb/99nqfz7s2rb6d_p0d6yxtbxc0000gn/T//RtmpZ54EtT/rtemis.toml
#>  [write_lines]