Skip to content

chore: 🚢 release v0.2.0 - #62

Merged
dionhaefner merged 9 commits into
mainfrom
bot/release/v0.1.1
Oct 21, 2026
Merged

dionhaefner merged 9 commits into
mainfrom
bot/release/v0.1.1

Conversation

@PasteurBot

@PasteurBot PasteurBot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the generated changelog for the release v0.1.1.

⚠️ Merging this PR will immediately trigger a new release. ⚠️

To specify additional release notes, please edit this comment after the following line.


Action required

New minimum versions

tesseract-torch now requires:

  • Python 3.12 or newer (3.10 and 3.11 are no longer supported)
  • PyTorch 2.3 or newer
  • tesseract-core 1.15.0 or newer

Upgrading tesseract-torch with pip or uv pulls in the new tesseract-core automatically. On an older Python version, the resolver keeps you on tesseract-torch 0.1.0.

Highlights

Batching with torch.vmap

apply_tesseract now works inside torch.vmap. Choose how the batch reaches the Tesseract with the new vmap_method keyword:

import torch
from tesseract_torch import apply_tesseract

def f(x):
    return apply_tesseract(tess, {"x": x, "A": A}, vmap_method="expand_dims")["y"]

ys = torch.vmap(f)(xs)  # one Tesseract call for the whole batch
  • "sequential" calls the Tesseract once per batch element and works with any schema. Start here if you are unsure.
  • "expand_dims" and "broadcast_all" call the Tesseract once with a leading batch dimension. The schema must accept it (e.g. Array[..., Float64]).
  • None (the default) raises inside torch.vmap, as before.

Reverse and forward mode both work through batched calls. torch.func.grad, jacrev and jacfwd are still not supported. Inside torch.vmap, non-differentiable array outputs come back as tensors rather than NumPy arrays. See the new "Batching with torch.vmap" docs page for the exact rules.

CUDA tensors stay on the GPU (experimental)

When you pass CUDA tensors and the Tesseract offers a working GPU transport, the tensors are now handed over on the device instead of being copied through the host. Outputs come back as CUDA tensors. To use it, serve the Tesseract with cuda_ipc:

from tesseract_core import Tesseract

with Tesseract.from_source("tesseract_api.py", gpu_transport="cuda_ipc") as tess:
    out = apply_tesseract(tess, {"x": x.cuda()})
    out["y"].device  # cuda:0

The Tesseract object decides the transport:

  • A Tesseract created with gpu_transport="cuda_ipc" (via from_source, from_image, or from_tesseract_api) uses it, and the call raises if the transport does not work from your process.
  • A Tesseract.from_url client uses cuda_ipc if the server offers it and it works. Otherwise the call falls back to the host with a one-time warning.
  • tess.with_encoding(gpu_transport="none") always copies through the host.

Things to know:

  • A Tesseract served with cuda_ipc must run tesseract-core 1.15 or newer, so rebuild older images. It must also be served with a single worker.
  • With from_tesseract_api(..., gpu_transport="cuda_ipc"), endpoints receive the caller's CUDA tensors directly and must not modify them in place.
  • Gradients always land on the device of the input they belong to.

See the new "CUDA tensors" docs page for details.

Gradients for dict- and list-valued differentiable fields

Fields typed dict[str, Differentiable[...]] or list[Differentiable[...]] now get gradients on both inputs and outputs. In 0.1.0, a dict-valued differentiable input next to other differentiable inputs silently got no gradient. If you used such schemas, re-check your results.

Other changes

  • Safer autograd. Three cases that used to give silently wrong or confusing results now raise clear errors: modifying an input in place between forward and backward, taking higher-order derivatives through apply_tesseract, and batched backward (jacobian(..., vectorize=True), is_grads_batched=True). First-order gradients taken with create_graph=True still work.
  • Fewer derivative requests. VJP and JVP requests now leave out unused outputs, zero (co)tangents, and inputs that don't require grad. If every (co)tangent is zero, the call is skipped. This helps most with expensive endpoints, such as finite differences.
  • Dict keys containing ., {, } or \ work in differentiable fields.
  • Negative and conjugate tensor views, and NumPy arrays in non-native byte order, now convert correctly.
  • tesseract-torch can now be imported without the tesseract-core[runtime] extra installed.
  • New docs: a troubleshooting page and a nested-schema example.

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.30%. Comparing base (fc7fecd) to head (652e9ed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   90.30%   90.30%           
=======================================
  Files           2        2           
  Lines         361      361           
  Branches       66       66           
=======================================
  Hits          326      326           
  Misses         12       12           
  Partials       23       23           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dionhaefner dionhaefner changed the title chore: 🚢 release v0.1.1 chore: 🚢 release v0.2.0 Sep 22, 2026
@dionhaefner
dionhaefner merged commit 51ef925 into main Oct 21, 2026
25 checks passed
@dionhaefner
dionhaefner deleted the bot/release/v0.1.1 branch October 21, 2026 19:02
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Oct 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants