batchrun

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 32 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package batchrun runs the agent over a JSONL prompt dataset in parallel workers and writes trajectories, a checkpoint and tool statistics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(ctx context.Context, ns map[string]any, stdout io.Writer) (int, error)

Command runs icebath batch from its parsed flags and returns the exit status of the run

Types

type InterruptedError

type InterruptedError struct{ Signal os.Signal }

InterruptedError reports a run a signal stopped before it finished

func (*InterruptedError) Error

func (e *InterruptedError) Error() string

Error names the interruption

func (*InterruptedError) ExitCode

func (e *InterruptedError) ExitCode() int

ExitCode is the status a shell reports for a process the signal ended

type Options

type Options struct {
	DatasetFile  string
	BatchSize    int
	RunName      string
	Distribution string
	// Tool calling iterations one prompt may take
	MaxIterations int
	BaseURL       string
	APIKey        string
	Model         string
	NumWorkers    int
	Verbose       bool
	// System prompt the agents run under that is never written to a trajectory
	EphemeralSystemPrompt string
	LogPrefixChars        int
	ProvidersAllowed      []string
	ProvidersIgnored      []string
	ProvidersOrder        []string
	ProviderSort          string
	ReasoningConfig       map[string]any
	PrefillMessages       []any
	// First entries of the dataset to keep, zero keeping all of them
	MaxSamples int
}

Options are the settings of one batch run

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner holds the dataset, batches and output paths of one batch run

func New

func New(ctx context.Context, o Options, out io.Writer) (*Runner, error)

New validates the distribution, creates the output directory, loads the dataset and splits it into batches

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, resume bool) error

Run processes every batch, then merges the batch files and writes the statistics, resume first dropping prompts a batch file already holds

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL