Skip to content

Summarise

summarise

Summarise workflow action.

Aggregates numerical metrics from cache entries into summary statistics (mean, standard deviation, count) and writes a table in CSV, LaTeX or Markdown format, named by the output extension. The action is stateless, so validation and execution delegate to module-level helpers and each step stays within the module and method limits.

The action class lives in action and delegates to request (parameter parsing and validation), execution (collect, compute, render), collect (value collection from entries and caches), columns (column specifications), formula (derived columns), stats (statistic computation), present (display columns shared by the renderers), footer (footer rows) and render (renderer selection). Public names are re-exported here so the provider and existing imports keep working.

The output extension selects the renderer: .csv writes raw values, .tex writes a LaTeX tabular fragment and .md writes a Markdown table. Only the presentation formats apply the format and footer parameters, so a plot step can still read a CSV numerically.

Modules:

  • action –

    The summarise action class and parameter validation.

  • collect –

    Collecting metric values from entries and input caches.

  • columns –

    Column specifications for the summarise action.

  • execution –

    Running one summarisation: collect, compute, render.

  • footer –

    Footer rows for the presentation table renderers.

  • formula –

    Derived-column formulas for the summarise action.

  • groups –

    Grouping helpers for report-mode summarisation.

  • present –

    Presentation columns shared by the table renderers.

  • render –

    Writing a summary table in the format named by the output path.

  • render_csv –

    Writing summary rows to a CSV file.

  • render_latex –

    Rendering a summary table as a LaTeX tabular fragment.

  • render_markdown –

    Rendering a summary table as a GitHub-flavoured Markdown table.

  • report –

    Collecting grouped metric values for report-mode summarisation.

  • request –

    Parsing and validating summarise action parameters.

  • stats –

    Summary statistics for summarise column specifications.

Classes:

  • SummariseAction –

    Summarise metric values from cache entries into a table.

SummariseAction

Summarise metric values from cache entries into a table.

Attributes:

  • action_name –

    Action name as used in workflow definitions.

  • pattern –

    Workflow action pattern used for cache validation.

Methods:

  • run –

    Execute metric summarisation to a table file.

  • validate –

    Validate summarise parameters before execution.

run
run(
    parameters: Dict[str, Any],
    mode: str,
    context: Optional[Any] = None,
    logger: Optional[Any] = None,
) -> ActionResult

Execute metric summarisation to a table file.

Aggregation mode summarises the pre-scanned cache entries passed via '_aggregation_entries' per matrix combination; direct mode reads entries from the 'input' cache files and produces a single summary row.

Parameters:

  • parameters
    (Dict[str, Any]) –

    Action parameter values.

  • mode
    (str) –

    Execution mode ('dry-run', 'run' or 'compare').

  • context
    (Optional[Any], default: None ) –

    Workflow context for optimisation.

  • logger
    (Optional[Any], default: None ) –

    Logger for reporting.

Returns:

  • ActionResult –

    Tuple of (status, metadata, objects).

Raises:

  • ActionExecutionError –

    If execution fails.

validate
validate(parameters: Dict[str, Any]) -> None

Validate summarise parameters before execution.

Parameters:

  • parameters
    (Dict[str, Any]) –

    Action parameter values.

Raises:

  • ValueError –

    If a parameter is missing or invalid. The provider converts this to an ActionValidationError.