Skip to contents

Verifies the saved fitted objective without optimising or sampling. Existing diagnostics, posterior draws, derived outputs, and provenance are preserved.

Usage

opal_from_fit(x, integrity = c("portable", "exact"))

Arguments

x

A legacy opal_fit or an opal_obj.

integrity

Legacy runtime verification mode; portable permits verified cross-R reads.

Value

An opal_obj.

Examples

legacy <- read_opal_fit(system.file("extdata", "opaka_quickstart_fit.rds",
                                   package = "opal"), integrity = "portable")
#> Warning: The saved fit runtime identity differs because it was serialized under a different R version; verifying by rebuild.
#> Warning: Portable runtime identity was not independently verified because `rebuild = FALSE`.
#> Warning: The opal_model implementation checksum differs from the saved fit. The saved fit used opal 0.0.4; the current version is 0.1.1.
assessment <- opal_from_fit(legacy)
#> Warning: The saved fit runtime identity differs because it was serialized under a different R version; verifying by rebuild.
#> Warning: The saved fit runtime identity differs because it was serialized under a different R version; verifying by rebuild.
#> Warning: The opal_model implementation checksum differs from the saved fit. The saved fit used opal 0.0.4; the current version is 0.1.1.
summary(assessment)
#> <opal_obj> fitted
#> Active parameters: 127 
#> Objective: 1832.412 
#> Fit check: not run  | MCMC check: not run