Save a complete module program artifact to a pins board for later retrieval. This uses the versioned manifest documented in program-artifact, including nested programs and shared module identity.
Usage
pin_module_config(
board,
name,
module,
description = NULL,
versioned = TRUE,
...,
registry = list(),
trusted = FALSE
)Arguments
- board
A pins board object (e.g., from
pins::board_folder())- name
Character name for the pin
- module
A DSPrrr module whose configuration should be saved
- description
Optional description for the pin
- versioned
Logical; whether to version the pin (default TRUE)
- ...
Additional arguments passed to
pins::pin_write()- registry
Named runtime registry; see program-artifact.
- trusted
Whether trusted runtime values may be embedded. The default is
FALSE.
Details
The pinned configuration includes:
Signature specification (inputs, output type, instructions)
Module configuration (temperature, prompt_style, etc.)
Optimization state (best parameters, trials summary)
Metadata (module type, creation timestamp, package version)
See also
Other orchestration:
orchestration,
pin_trace(),
pin_vitals_log(),
restore_module_config(),
use_dsprrr_template(),
validate_workflow()
Examples
if (FALSE) { # \dontrun{
# Create a board and pin a module configuration
board <- pins::board_folder("pins")
mod <- signature("text -> sentiment") |>
module(type = "predict") |>
optimize_grid(devset, metric = exact_match)
pin_module_config(board, "sentiment-classifier-v1", mod,
description = "Optimized sentiment classifier")
# Later, retrieve and reconstruct the module
config <- pins::pin_read(board, "sentiment-classifier-v1")
restored_mod <- restore_module_config(config)
} # }