Skip to content

v0.2.0

Choose a tag to compare

@earthsciml-bot earthsciml-bot released this 01 Nov 16:24
· 56 commits to main since this release
2a7603b

EarthSciASTDiff v0.2.0

Diff since v0.1.0

EarthSciASTDiff v0.2.0

The Jacobian is now delivered as ESM documents that EarthSciAST evaluates,
and the bindings no longer evaluate anything themselves. Every product a
solver needs (Jv, Jᵀλ and the second-order contraction) is a derived
document that an unmodified EarthSciAST evaluator runs in one right-hand-side
call. The band calculus also covers more of the language: forcing buffers,
array parameters, second-order bands, filters, max/min/* reductions and
causal recurrences.

Breaking changes

  • The evaluators are removed from all three packages. Build the
    evaluation document (evaluation_document) or a product document
    (jvp_document, vjp_document, hvp_document) and evaluate it with
    EarthSciAST. Applying a scatter plan to the evaluated band fields is up to
    the consumer.

    • Julia: prepare_jacobian / JacobianEvaluator / jac!,
      assemble_jacobian, jac_into!, vjp!, vjp_forcing! and
      prepare_hvp / HVPEvaluator / hvp! are removed. The SciMLBase
      extension (ode_components, odefunction, odeproblem) is removed too.
    • Rust: numeric.rs and program.rs are removed: assemble_jacobian,
      prepare_jacobian / JacobianEvaluator, vjp, vjp_forcing,
      band_fields, prepare_hvp / HvpEvaluator / hvp, JacobianProgram
      and HvpProgram. BoundScatter is now plain data (field_lens,
      pairs), with no scatter method.
    • Python: numeric.py and its exports are removed.
  • Rust: SysView::variables is now a Cow<'a, IndexMap<…>>.
    .iter(), .get(), .keys() and indexing work as before, but
    for x in sv.variables needs .iter(). parse_jacobian_blocks now returns
    Vec<ParsedBlock>, and jacobian_blocks takes Into<BlockWrt>, so
    existing &[Wrt::…] calls still compile.

  • Python 3.11 or newer is required (was 3.9), because EarthSciAST 0.7
    requires it.

  • Supported EarthSciAST releases:

    Package v0.1.0 v0.2.0
    Julia 0.4, 0.5, 0.6 0.6, 0.7
    Rust 0.6 >=0.5, <0.8
    Python unbounded >=0.4, <0.8

    EarthSciAST.jl 0.4 and 0.5 no longer precompile, so the Julia package now
    starts at 0.6. CI tests each package against both the oldest and the newest
    release in its range.

  • Array parameters are now columns on the parameters axis. Before,
    their cells were silently dropped. On the parameters and forcing axes,
    a column outside its variable's extent, or one that isn't fixed at build
    time, is now an error.

New

  • Product documents (spec §9) in Julia, Rust and Python: jvp_document,
    vjp_document and hvp_document (form = :contract or :symmetric).
    Each returns the input and output names the caller fills and reads.
  • Scatter plans in Python (scatter_plan, serialize_scatter_plan,
    bind_plan), matching Julia and Rust.
  • Forcing and array-parameter columns (wrt = "forcing", RFC U7). The
    forcing set is inferred from array parameters with a data update, or can
    be passed in.
  • Second-order bands (spec §4.4, RFC U8): "wrt": [a1, a2] blocks for
    Rosenbrock discrete adjoints.
  • More operators (RFC U9). Filtered faq nodes, max/min/*
    reductions and the max_product semiring, which used to be refused, are now
    differentiated. So are value-indexed reads, such as a level search
    x[κ(u)]. Index-only filters the band box can't express become an
    optional where on the entry. column_block structure and factorization
    plans are new too, including per-line diag_plus_rank1.
  • Causal recurrences (spec §4.5), Rust and Python only. An observed
    that reads itself at an earlier cell is differentiated through a transfer
    recurrence, which is carried in the block's new auxiliary field. Product
    documents never form that recurrence explicitly. The Julia package doesn't
    differentiate recurrences yet; that waits on EarthSciAST.jl executing them.
  • Rust: sysview_flat and jacobian_bands_view differentiate a
    flattened system; plan_factorization and serialize_plan are now
    exported.

Fixes

  • A unary - around a whole array expression lost its sign, in all three
    packages.
  • A site whose subscripts contain a faq node no longer fails
    canonicalization.

Breaking changes

  • feat(bindings)!: retire the Rust and Python evaluators (c56daa2)
  • feat(julia)!: evaluate nothing; drop the numeric evaluators (b4c9c1b)
  • fix(rust)!: lifted shapes in sysview_flat, a checked plan_factorization (473e1cc)
  • feat(rust)!: view a flattened system; plan_factorization and serialize_plan (72b646b)

Changelog

  • chore(release): v0.2.0 (5dc5c10)
  • style(python): lint for Python 3.11, the requires-python floor (534095d)
  • chore(python): require Python 3.11 (e11bc74)
  • chore(deps): admit EarthSciAST 0.7 in every binding (2f9bc67)
  • ci: take the upstream EarthSciAST ref from the dispatch, not a workflow_call input (206872c)
  • ci: run Python 3.9 on ubuntu-24.04; no caches when testing an EarthSciAST ref (bb1cb91)
  • ci: address PR #44 review of the registry-gated conformance (213984d)
  • fix(bindings): address PR #42 review of recurrence differentiation (e81b178)
  • ci: gate releases on published EarthSciAST releases, at both ends of each range (cd510fb)
  • feat(bindings): differentiate through causal recurrences (spec §4.5, §9.7) (7e1cff4)
  • fix(bindings): port #39's structural build-time extent decisions to Rust and Python (e92b395)
  • fix(bindings): address PR #41 review of product documents and test helpers (f8e66e7)
  • test(bindings): take every value from the emitted documents; retire the oracles (0399a3e)
  • feat(python): port the scatter plans (spec §8) (5ea46d8)
  • feat(bindings): emit the evaluation and product documents in Rust and Python (e719bc9)
  • fix(julia): review fixes for product documents (1e85adf)
  • feat(bindings)!: retire the Rust and Python evaluators (c56daa2)
  • feat(julia)!: evaluate nothing; drop the numeric evaluators (b4c9c1b)
  • feat(julia): emit Jv, Jᵀλ and hvp as product documents (spec §9) (68fe059)
  • spec: tighten §9 product documents after review (dc7c778)
  • spec: propose product documents (Jv, Jᵀλ, hvp) evaluated by EarthSciAST (d3e03e9)
  • fix(tests): keep dx = 1 m / 16 in minmod_adv and regenerate its evaldoc goldens (f812958)
  • fix(julia,python): plan_factorization refuses unknown classes and rectangular band lists (5703fd7)
  • fix(rust)!: lifted shapes in sysview_flat, a checked plan_factorization (473e1cc)
  • fix: address PR #35 review findings across all three bindings (726fd73)
  • docs: column_lines and the column_block plan in the API surface (e03770b)
  • feat(rust): filtered faq, max/min/* reductions and value-indexed reads (spec §3.5) (00a0a08)
  • feat(python): filtered faq, max/min/* reductions and value-indexed reads (spec §3.5) (e18b169)
  • feat(julia): filtered faq, max/min/* reductions and value-indexed reads (spec §3.5) (bab51e4)
  • feat(rust)!: view a flattened system; plan_factorization and serialize_plan (72b646b)
  • fix(rust): runtime array parameters in JacobianProgram, shared block code (4e109c1)
  • fix(python): refuse a bare tuple wrt, share first-order passes and block code (cdb603c)
  • fix(julia): refuse a bare Tuple wrt, share first-order passes and block code (813816d)
  • feat(rust): compiled second-order contraction (HvpProgram) (3f72d10)
  • feat(rust): second-order bands and hvp (spec §4.4) (7375315)
  • feat(python): second-order bands and hvp (spec §4.4) (432d8d3)
  • feat(julia): second-order bands and the hvp! contraction (spec §4.4) (17ce4d7)
  • fix(rust): array defaults, prepared evaluator, required wrt (281a238)
  • fix(python): prepared evaluator, strict λ, parameter ghost reads (3809087)
  • fix(julia): parameter ghost reads, zero-derivative forcing, String axes (66b2a90)
  • feat(rust): forcing axis and array-parameter columns (spec §4.3) (25dc479)
  • feat(python): forcing axis and array-parameter columns (spec §4.3) (86ec1e1)
  • fix(julia): write array defaults row-major in the evaluation document (457ff2c)
  • feat(julia): forcing-buffer and array-parameter columns (spec §4.3) (113f262)
  • ci: add the shared lint workflow (28d6915)
  • fix: clear clippy and ruff findings for the shared lint gate (93a3e8a)
  • style: apply rustfmt, ruff format and Runic (e0c9447)
  • chore(deps): bump the github-actions group with 7 updates (0edb85d)
  • chore(deps): bump the julia group (07a8e08)
  • ci: add Dependabot version updates and dependency review (5e70eb1)

Merged pull requests:

  • refactor(units): give bare literals their units (esm-spec §4.8.6) (#26) (@ctessum-claude)
  • feat: second-order bands for Rosenbrock discrete adjoints (U8) (#29) (@ctessum-claude)
  • feat(rust)!: view a flattened system; plan_factorization and serialize_plan (#34) (@ctessum-claude)
  • feat: derivatives through filtered faq, max/min/* reductions and value-indexed reads (U9 part 1) (#35) (@ctessum-claude)
  • spec: propose product documents (Jv, Jᵀλ, hvp) evaluated by EarthSciAST (#38) (@ctessum-claude)
  • feat(julia): product documents (spec §9), and the Julia package evaluates nothing (#39) (@ctessum-claude)
  • feat(bindings)!: retire the Rust and Python evaluators (#40) (@ctessum-claude)
  • feat(bindings): product documents and scatter plans in Rust and Python; retire the test oracles (#41) (@ctessum-claude)
  • feat(bindings): differentiate through causal recurrences (U9 part 2) (#42) (@ctessum-claude)
  • feat(bindings)!: land #40 and #41 on main (retire the binding evaluators; product documents in Rust and Python) (#43) (@ctessum-claude)
  • ci: gate releases on published EarthSciAST releases, at both ends of each range (#44) (@ctessum-claude)
  • chore(deps): admit EarthSciAST 0.7 in every binding; require Python 3.11 (#46) (@ctessum-claude)
  • style(python): lint for Python 3.11, the requires-python floor (#47) (@ctessum-claude)
  • chore(release): v0.2.0 (#48) (@ctessum-claude)

Closed issues:

  • RFC: Second-order bands for Rosenbrock discrete adjoints (#2)
  • RFC: Derivatives through filtered faq, non-"+" reductions and causal recurrences (#3)
  • Rust and Python export the reference evaluator as the main evaluation API (#30)
  • JacobianProgram ignores run-time array parameters of the source program (#31)
  • Lane form of the compiled second-order contraction (HvpProgram) (#32)
  • Evaluation belongs to EarthSciAST: emit products as documents, delete the evaluators here (#37)

Installation

using Pkg; Pkg.add("EarthSciASTDiff")   # Julia
pip install earthsci-astdiff             # Python