Learn R Programming

mlr3tuning (version 1.5.1)

mlr3tuning.asnyc_mlflow: MLflow Connector Callback

Description

This mlr3misc::Callback logs the hyperparameter configurations and the performance of the configurations to MLflow.

Arguments

Examples

Run this code
# example only runs if mlflow is available
if (mlr3misc::require_namespaces("mlflow", quietly = TRUE)) {
clbk("mlr3tuning.async_mlflow", tracking_uri = "http://localhost:5000")

if (FALSE) {
rush::rush_plan(n_workers = 4)

learner = lrn("classif.rpart",
  minsplit = to_tune(2, 128),
  cp = to_tune(1e-04, 1e-1))

instance = TuningInstanceAsyncSingleCrit$new(
  task = tsk("pima"),
  learner = learner,
  resampling = rsmp("cv", folds = 3),
  measure = msr("classif.ce"),
  terminator = trm("evals", n_evals = 20),
  store_benchmark_result = FALSE,
  callbacks = clbk("mlr3tuning.rush_mlflow", tracking_uri = "http://localhost:8080")
)

tuner = tnr("random_search_v2")
tuner$optimize(instance)
}}

Run the code above in your browser using DataLab