% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spectra-train.R
\name{save_ossl_models}
\alias{save_ossl_models}
\alias{load_ossl_models}
\title{Save / load trained OSSL-backed PLSR models}
\usage{
save_ossl_models(models, path)

load_ossl_models(path)
}
\arguments{
\item{models}{Output of \code{\link{train_pls_from_ossl}}.}

\item{path}{File path. Use \code{.rds} or \code{.RData} as the
suffix (saveRDS is used regardless).}
}
\value{
\code{save_ossl_models()} returns \code{path} invisibly.
        \code{load_ossl_models()} returns the model list.
}
\description{
Thin wrappers around \code{saveRDS} / \code{readRDS} that also
verify the deserialised object's shape. The on-disk file carries
the soilKey version, training time and preprocess label as
attributes; \code{\link{load_ossl_models}} preserves them.
}
