Dsxir (dsxir v0.1.0)

Copy Markdown

Top-level facade for the dsxir framework. Re-exports the user-facing entry points; predictors, adapters, optimizers, and LM impls are reached for under their own module names.

Summary

Functions

Run fun.() with a per-process trace accumulator open. The block must return {program, prediction} (the standard forward/2 shape). The helper returns {program, prediction, trace} where trace is the list of recorded entries in invocation order.

Functions

compile(impl, student, trainset, metric, opts)

See Dsxir.Optimizer.compile/5.

configure(opts)

See Dsxir.Settings.configure/1.

context(frame, fun)

See Dsxir.Settings.context/2.

evaluate(ev, program)

See Dsxir.Evaluate.run/2.

evaluate!(ev, program)

See Dsxir.Evaluate.run!/2.

load(target_module, path, opts \\ [])

See Dsxir.Artifact.load/3.

load!(target_module, path, opts \\ [])

See Dsxir.Artifact.load!/3.

save(program, path)

See Dsxir.Artifact.save/2.

save!(program, path)

See Dsxir.Artifact.save!/2.

with_trace(fun)

Run fun.() with a per-process trace accumulator open. The block must return {program, prediction} (the standard forward/2 shape). The helper returns {program, prediction, trace} where trace is the list of recorded entries in invocation order.

The accumulator is process-local. Inside the block, any Dsxir.Module.call/3 running in the calling process records an entry; calls inside spawned tasks (Dsxir.Predictor.Parallel, user-supplied Tasks) do not — Trace does not cross process boundaries in v0.

When fun.() raises, throws, or exits, the prior accumulator is restored in the matching rescue / catch clause and the original condition is reraised. Partial traces on failure are not surfaced.