R Under development (unstable) (2024-06-27 r86847 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # `trivial` is a dummy MLflow flavor that exists only for unit testing purposes > > mlflow_save_model.trivial <- function(model, path, model_spec = list(), ...) { + if (dir.exists(path)) unlink(path, recursive = TRUE) + dir.create(path, recursive = TRUE) + path <- normalizePath(path) + + trivial_conf = list( + trivial = list(key1 = "value1", key2 = "value2") + ) + model_spec$flavors <- c(model_spec$flavors, trivial_conf) + mlflow:::mlflow_write_model_spec(path, model_spec) + } > > mlflow_load_flavor.mlflow_flavor_trivial <- function(flavor, model_path) { + list(flavor = flavor) + } > > library(testthat) > library(mlflow) > > if (identical(Sys.getenv("NOT_CRAN"), "true")) { + message("Current working directory: ", getwd()) + test_check("mlflow", reporter = ProgressReporter) + } > > proc.time() user system elapsed 0.42 0.18 0.59