From 199c434b5cc7d776038d7c4729cb973b03187990 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Fri, 31 Jul 2020 12:33:53 -0700 Subject: [PATCH] Add a paragraph about xgb.serialize() [skip ci] --- R-package/R/utils.R | 4 ++++ R-package/man/a-compatibility-note-for-saveRDS-save.Rd | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/R-package/R/utils.R b/R-package/R/utils.R index 3a3126d8b0b3..b0c653f17671 100644 --- a/R-package/R/utils.R +++ b/R-package/R/utils.R @@ -330,6 +330,10 @@ NULL #' The \code{\link{xgb.save.raw}} function is useful if you'd like to persist the XGBoost model #' as part of another R object. #' +#' Note: Do not use \code{\link{xgb.serialize}} to store models long-term. It persists not only the +#' model but also internal configurations and parameters, and its format is not stable across +#' multiple XGBoost versions. Use \code{\link{xgb.serialize}} only for checkpointing. +#' #' For more details and explanation about model persistence and archival, consult the page #' \url{https://xgboost.readthedocs.io/en/latest/tutorials/saving_model.html}. #' diff --git a/R-package/man/a-compatibility-note-for-saveRDS-save.Rd b/R-package/man/a-compatibility-note-for-saveRDS-save.Rd index 544dc00055e3..63b8dfce52ac 100644 --- a/R-package/man/a-compatibility-note-for-saveRDS-save.Rd +++ b/R-package/man/a-compatibility-note-for-saveRDS-save.Rd @@ -24,6 +24,10 @@ re-construct the corresponding model. To read the model back, use \code{\link{xg The \code{\link{xgb.save.raw}} function is useful if you'd like to persist the XGBoost model as part of another R object. +Note: Do not use \code{\link{xgb.serialize}} to store models long-term. It persists not only the +model but also internal configurations and parameters, and its format is not stable across +multiple XGBoost versions. Use \code{\link{xgb.serialize}} only for checkpointing. + For more details and explanation about model persistence and archival, consult the page \url{https://xgboost.readthedocs.io/en/latest/tutorials/saving_model.html}. }