Skip to content

Steps — Plot

Plot step: saves and displays visualizations for whichever results are present.

Generate, save, and display plots for whichever results are present.

A single generic plotting step. It inspects results and, for every domain it recognizes, builds an interactive Plotly figure, writes it under a plots/ subdirectory, and displays it inline when run in a notebook, so the same step drops onto the end of any pipeline. Each domain is optional and handled only when its result is present:

results['steering']: SteeringResult
separation_scores, cosine_similarity
results['probe']: ProbeResult
probe_accuracy, plus confusion_matrix when the probe kept its
classifiers and results['record'] is available
results['logit_lens']: LogitLensResult
logit_lens
results['logit_attribution']: LogitAttributionResult
logit_attribution
results['sweep']: SweepResult
sweep, drawn as a layer-by-head heatmap when the sweep ranged over
attention heads and as one bar per item otherwise

Attention, SAE, and activation-projection plots are not auto-dispatched: they need an explicit head, feature, or reducer choice with no sensible default, so call the murano.plotting functions (plot_attention_pattern, plot_sae_token_activations, plot_activation_projection, …) directly instead.

Args:

  • output_dir: Root output directory. If None, uses results[‘output_dir’]
  • when a preceding Save set it, otherwise murano_outputs.
  • show: Display each figure inline when run in a notebook. Defaults to True.
  • save_format: File format for saved figures. "png" (default) writes a
  • static image via kaleido and falls back to a self-contained
  • interactive HTML page (with a warning) when kaleido is unavailable,
  • as on many headless Slurm nodes. Pass "html" to always write the
  • interactive page, or another kaleido format (e.g. "svg",
  • "pdf"). Inline display in a notebook is interactive regardless.
def __init__(self, output_dir: str | None = None, show: bool = True, save_format: str = 'png'):