validate_workflow() runs quick checks before an expensive batch run or
pipeline step: that module is a dsprrr module, how many inputs its
signature has, that data has a column for every input, and that board
is a pins board. It prints one line per check and makes no model calls.
Value
Invisibly, a list with valid (FALSE when the module, data or
board check fails) and checks (one list per check with passed and
message).
See also
Other integrations:
as_dsprrr_metric(),
as_dsprrr_traces(),
as_ellmer_tool(),
as_vitals_cost(),
as_vitals_samples(),
as_vitals_solver(),
as_vitals_task(),
create_search_tool(),
llm_predict(),
ragnar_tool(),
reasoning_effort(),
register_dsprrr_engine(),
summarize_traces_df(),
temperature(),
top_p(),
use_dsprrr_template(),
vitals_metrics
Examples
classifier <- module(signature("text -> sentiment"))
reviews <- data.frame(text = c("Great!", "Awful."))
validate_workflow(classifier, data = reviews)
#>
#> ── Workflow Validation ──
#>
#> ✔ module: Module type: PredictModule
#> ✔ signature: 1 input(s) defined
#> ✔ data: 2 rows, 1 required columns present
#> ✔ Workflow validation passed
# A missing input column fails the check
result <- validate_workflow(classifier, data = data.frame(review = "Great!"))
#>
#> ── Workflow Validation ──
#>
#> ✔ module: Module type: PredictModule
#> ✔ signature: 1 input(s) defined
#> ✖ data: Missing columns: text
#> ✖ Workflow validation failed
result$valid
#> [1] FALSE