glance.ggmlr_parsnip_model: One-row summary of a fitted ggml parsnip model

View source: R/parsnip_broom.R

glance.ggmlr_parsnip_modelR Documentation

One-row summary of a fitted ggml parsnip model

Description

Returns a single-row [tibble][tibble::tibble] summarising the fitted model, in broom 'glance()' style.

Usage

## S3 method for class 'ggmlr_parsnip_model'
glance(x, ...)

Arguments

x

A fitted 'ggmlr_parsnip_model' (the engine object inside a parsnip fit; e.g. from 'extract_fit_engine()').

...

Unused; for generic compatibility.

Value

A one-row tibble with columns: 'mode', 'n_features', 'n_layers', 'total_params', 'optimizer', 'loss', 'backend', 'epochs', 'fit_time' (wall seconds) and 'final_loss' (last training loss, 'NA' if no history).

Examples


ggml_set_n_threads(1L)  # deterministic, single OpenMP pool
spec <- parsnip::mlp(hidden_units = 8L, epochs = 3L) |>
  parsnip::set_engine("ggml", backend = "cpu") |>
  parsnip::set_mode("regression")
fit_obj <- parsnip::fit(spec, mpg ~ ., data = mtcars)
generics::glance(parsnip::extract_fit_engine(fit_obj))


ggmlR documentation built on July 14, 2026, 1:08 a.m.