Exceptions

NAME

LLM::Data::Pipeline::Exceptions - typed failures thrown by the pipeline Runner

DESCRIPTION

X::LLM::Data::Pipeline::StepExhausted is thrown by LLM::Data::Pipeline::Runner when a plain step's retry budget (LLM::Data::Pipeline::RetryPolicy) is spent without a successful attempt. It carries the step name, the number of attempts made, and the last-error — the actual exception from the final attempt — so callers can inspect (or rethrow) the underlying cause while still catching a Pipeline-typed failure. Its message quotes the last error, so string-matching callers keep working.

Only thrown when retry is opted into (max-attempts greater than 1). With the default single-attempt policy the Runner rethrows the step's original exception unchanged, preserving the pre-0.3.0 contract that domain exception types (e.g. X::LLM::Data::Inference::Exhausted) flow straight out to callers.

The remaining classes are declared now and thrown from later releases:

  • X::LLM::Data::Pipeline::Cancelled — cooperative cancellation (from 0.4.0).

  • X::LLM::Data::Pipeline::ItemsDead — a fail-on-dead item step finished with dead items (from 0.4.0).

  • X::LLM::Data::Pipeline::CheckpointDrift — a resumed in-progress item step no longer matches its recorded fingerprint (from 0.4.0).

EXAMPLES


use LLM::Data::Pipeline::Runner;
use LLM::Data::Pipeline::Exceptions;

my $runner = LLM::Data::Pipeline::Runner.new(
	step-retry => LLM::Data::Pipeline::RetryPolicy.new(:max-attempts(3)),
);

{
	CATCH {
		when X::LLM::Data::Pipeline::StepExhausted {
			note "step {.step} gave up after {.attempts} tries";
			note "underlying cause: {.last-error.^name}: {.last-error.message}";
		}
	}
	$runner.run($plan, $ctx);
}

LLM::Data::Pipeline v0.7.1

Generic pipeline framework for composing and running sequential data processing steps with checkpointing

Authors

  • Matt Doughty

License

Artistic-2.0

Dependencies

JSON::Fast:ver<0.19>:auth<cpan:TIMOTIMO>JSONL:ver<0.1.3+>:auth<zef:apogee>Digest::SHA256::Native:ver<1.0.0+>:auth<zef:bduggan>

Test Dependencies

Provides

  • LLM::Data::Pipeline
  • LLM::Data::Pipeline::Context
  • LLM::Data::Pipeline::Event
  • LLM::Data::Pipeline::Exceptions
  • LLM::Data::Pipeline::Plan
  • LLM::Data::Pipeline::RetryPolicy
  • LLM::Data::Pipeline::Runner
  • LLM::Data::Pipeline::Step
  • LLM::Data::Pipeline::Step::Items

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.